Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I think help coding this whole thing instead of using words, need codes in language java 2.1 Random midpoint displacement method Random midpoint displacement method

I think help coding this whole thing
instead of using words, need codes
image text in transcribed
in language java
2.1 Random midpoint displacement method Random midpoint displacement method introduced by Fourineret al. [4represents de facto standard in fractal terrains generation techniques. The principle is as follows An initial square is subdivided into four smaller squares (see Figure 2) Let us have four points . . . .. ... ... In the first step we add one vertex into the middle. The vertex is denoted by a f a ll, where + ya. - Urs)+Ff29e)+Ff93) + ]] The added vertex is shifted in 2-coordinate direction by random value denoted by 6. This procedure is recursively repeated for each subsquare, then for every their descendants, and so on. Figure 2: First four steps in random midpoint displacement method In order to be resulting surface Bm, the random number & must be generated with Gaussian distribution la =0,= 1 and in the i-th iteration step the variation have to be modified according to where H denotes Hurst exponent [6] (152 ). From equation (1) we can see that the first iteration has the biggest influence to the resulting shape of the surface and influence of the others decreases. In the second step we calculate the points on the edges of initial square. We virtually rotate square by 45 and calculate the values as in the previous step. The problem is in the cases when the new point has just three neighbors (the encircled points in Figure 2). In this case we calculate the average of three neighbors only. The error produced on the border could be neglected. In the next step we virtually rotate the square back by and we recursively apply the first two steps on the four new squares as is mentioned above. This recursive process ends after given number of iteration Fractal dimension D of surface is obtained by D-3-H. An example of fractal terrain obtained with random midpoint displacement algorithm is in Figure 3. The fractal dimension of this surface is D-2.5. Figure: Example of fractal terrain with fractal dimension D-2.5. (a) wire frame model (b) the same model textured

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

Explain the concept of employment at will.

Answered: 1 week ago

Question

Discuss compensation for sales representatives.

Answered: 1 week ago

Question

Explain termination of employment.

Answered: 1 week ago