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

  • SEARCH
  • Home
  • 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 6368547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:41:22+00:00 2026-05-25T00:41:22+00:00

Supposing you have a 3d box of cubes, with each cube having 3 indices:

  • 0

Supposing you have a 3d box of cubes, with each cube having 3 indices: (x,y,z), and 1 additional attribute to specify if it represents land or air.

Let’s say that we have a 3d array to represent this box of cubes, with each cube being an element in the 3d array.

The following array, for example, would represent a bowl shaped piece of land:

y=0:        
0 0 0 0 0     
0 0 0 0 0
1 1 1 1 1
1 1 1 1 1

y=1:
0 0 0 0 0
0 0 0 0 0
1 0 0 0 1
1 1 1 1 1

y=2:
0 0 0 0 0
0 0 0 0 0
1 0 0 0 1
1 1 1 1 1

y=3:
0 0 0 0 0  
0 0 0 0 0
1 1 1 1 1
1 1 1 1 1

What is an algorithm such that given a selection box it would generate hills with f frequency and with average height of h, with v average variation in height?

We can assume that the lowest level of the bonding box is the “baseline”, or “sea-level”.

function makeTrees(double frequency, int height, double variation)
{
    //return 3d array.
}

I’m writing a minecraft MCEdit filter plugin 😛

  • 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-25T00:41:23+00:00Added an answer on May 25, 2026 at 12:41 am

    Simplest way is to decompose the problem into three parts:

    1. Write a routine to generate the cubes for a single hill of height h. Start off by making this a simple cone (play with apex angles till you find something that looks pleasing)

    2. Generate a set of n heights between h-v and h+v, using the random number generator of your choice

    3. Place n mountains randomly on your cube. It doesn’t matter if they intersect – indeed, it will lead to a better-looking range.

    However, I’d also suggest abandoning this approach, and simply generate a fractal terrain within your bounding cube, then discretize it. You can play with the paramaters to your fractal generator to bound the height and variance.

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

Sidebar

Related Questions

Supposing I have a File f that represents a directory, then f.delete() will only
Supposing I have a StringerHelper(Component|Helper|Behaviour).php class with a method for random strings. I might
Supposing I have 3 tables: Users, Roles and UserRoles. I can fetch the user_roles
Supposing I have one perl in /usr/bin (which came along with my os-distribution) and
Supposing I have this: foo bar 1 and foo bar 2 How can I
MVC newbie question re binders. Supposing I have two strongly typed partial actions that
Supposing that I have millions of user profiles, with hundreds of fields (name, gender,
Supposing I have a set of comma separated lists which I need to display
Supposing I have the following script <div id=something> <?php // execute a loop ?>
Supposing I have the following LambdaExpression: var itemParam = Expression.Parameter(typeof(Thing), thing); var someValue =

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.