Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6738889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:25:19+00:00 2026-05-26T11:25:19+00:00

I am working on a smooth terrain generation algorithm in C# and using XNA

  • 0

I am working on a smooth terrain generation algorithm in C# and using XNA to display the data.

I am making it so it creates a new point halfway between each point per iteration, at a random height between the two. This works OK, and I am getting the current result, randomly placed points.

Current Result

Now what I want to do is turn these points into a primitive (I think that is what it is) and display it like a mountain, obviously using a mountain texture. Example below (using different point data, made up in paint)

Example Result

Any help or tips are greatly appreciated, and look forward to your responses.

Thanks.

Twitchy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:25:19+00:00Added an answer on May 26, 2026 at 11:25 am

    You can draw triangle strips alternating between the points in your primitive and the bottom of the screen with the same x coordinate as the point just before it, stepping along the bottom of the screen.

    I am not familiar with drawing primitives in XNA (just openGL), but it should be similar.

    You take your points, e.g. A,B,C and D
    to draw the strips. you would have your vertices ordered as;

    vertex1= A  
    vertex2 = point(A.x, 0)  
    vertex3= B  
    vertex4 = point(B.x, 0)  
    vertex5= C  
    vertex6 = point(C.x, 0)  
    vertex7= D  
    vertex8 = point(D.x, 0)  
    

    (I assume the bottom of the screen has a y coordinate of 0, it can be screen height or whatever y you choose)

    http://en.wikipedia.org/wiki/Triangle_strip

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a smooth terrain generation algorithm in C# and using XNA
I am working on a core data using app and one of the views
Working with python interactively, it's sometimes necessary to display a result which is some
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
I've been working on a project in Eclipse and everything's been going smooth except
I am working on creating a contour plot using Matplotlib. I have all of
I have a button with a working listener in an ExtJs Data Grid. I
We’re working on a large project using Git and there’s quite a few development
I'm working on application which has workflow like this: 1.parsing home page (using HttpURLConnection,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.