POV-Ray : Newsgroups : povray.binaries.images : macro-land. (19K) : macro-land. (19K) Server Time
4 Oct 2024 09:14:33 EDT (-0400)
  macro-land. (19K)  
From: Spider
Date: 4 Apr 1999 14:44:11
Message: <37073C42.27BDE9D@bahnhof.se>
Well well well..
I came back and decided to do some work on the macros.

I actually rewrote the code, and smoothed it quite a bit. There are still a few
bad things there, that needs to be optimized(I really want to be able to make a
comparsion quickly, does anyone have an example?) esp. the algoithm to find
Minpoint and Maxpoint in the world. Can anyone help with something else than a
#if(min>current_point) #declare min = curren......
statement.

Well, I've slimmed the functions down a bit, there are now three main functions.

one is change_lin(vPoint, fMax) wich will do a linear curve calculation, from
the point vPoint and on every point. the fMax is a relevance thing, it is in the
range -1 to 1, and is the significance of how much this point will change.
if it is 1, it will cause a hill that has a full change, but if it is in the
range 0.5 it will only affect the landscape half as much.
this is achived by first changing the landscape to the haights of 0..1, then
multiplying with the value. thus, a negative value will cause a hole in the
ground.

there is also a change_log function, that will do a logarithmic function instead
of a linear. it is esp. useful on minor holes and hills, and should be used
where you don't want the point to affect the whole world.

and, there is a noise function, that will add some random noise to the world,
thus causing it to be a bit "rougher".

I've killed off a few of the output variants, and only have the checker and mesh
left. tell me if you want the otehrs as well.

The parse-time has been lowerd with a factor of about 90% (Whee, optimize :-)
ok, 100x100 grid takes 4 mins to parse. the things that takes time are the
unnecessary repeations of a loop. (I'd like to be able to make #macro references
in a #macro header. sorta like in pascal, 

procedure IntegrateWithSimpsonsMethod(lowerBound, upperBound : real; function
TheFunction)

the coders in here will know what I mean. and no, a #if and a constant/string
isn't a good idea in this case.



-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message


Attachments:
Download 'newground3.jpg' (18 KB)

Preview of image 'newground3.jpg'
newground3.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.