Re: Help me be lazy



On Sat, 20 May 2006 00:37:26 -0700, dtalagrand wrote:

There are several possible alternatives depending on what exactly you want
(of course, you can also use any combination to achieve the desired
result). Are you aiming more for realism or "real-time" (fast generation)?

Speed, definitely speed.

Spectral synthesis is very popular, but looks a bit rocky/angular
(especially with linear interpolation). Using cubic interpolation
significantly improves the results. However, 1/f-like noise algorithms
(Spectral, Mpd) are a bit monotonous, so I generally use an additional
perturbation filter (moving random distance and direction from each group
of "cells", and interpolating). This also has the added benefit of giving
a more eroded feel.

A simple algorithm that you might find interesting is the "hill"
algorithm, which generates nice rolling hills (big surprise!). You first
pick a random point on the terrain and a random radius, and then displace
all the points in the sphere (the closer to the point, the larger the
displacement), repeating the point/radius selection as many times as you
want, and then normalizing the field.

That's pretty much what I went with ellipses instead of circles for the
bases of the mountains and cosinusoidaly sloped sides. It involves a lot
of slow trig functions but it's not too bad. I'm still having trouble
coming up with criteria as to when to stop. The function basically takes
3 parameters, the location of the map array, the X and Y dimensions. So
it could be as small as 20X20 and as large as 2000 X 2000. Any Ideas?

--
Mark Healey
marknews(at)healeyonline(dot)com

.



Relevant Pages

  • Re: Help me be lazy
    ... (especially with linear interpolation). ... A simple algorithm that you might find interesting is the "hill" ... which generates nice rolling hills. ... displace all the points in the sphere (the closer to the point, ...
    (sci.fractals)
  • Re: Confusion about splitting classes to allow sharing of resources
    ... Then the Spline would ... actual interpolation to the algorithm de jour one set of points at a time. ... regeneration behavior since it is the only one that uses the data. ...
    (comp.object)
  • Re: Confusion about splitting classes to allow sharing of resources
    ... allows the selection of the algorithm to be separated from the routine computations. ... Spline classes, such as LinearSpline and CubicSpline, based on the same ... The higher-level class Curve should be able to select ... actual interpolation to the algorithm de jour one set of points at a time. ...
    (comp.object)
  • Re: 1080p...and why did I?
    ... I don't pretend to know the math or the algorithm behind the ... to fill than you would with 720p target. ... Interpolation of fractional differences may be better or worse ...
    (alt.tv.tech.hdtv)
  • Re: Canon domination?
    ... :>Interpolation which makes file size in itself less relevant to image ... algorithm, and they can do away with that silly RAW stuff too since you ... Caught on security camera. ... Bret Douglas version? ...
    (rec.photo.equipment.35mm)