|
![](/i/fill.gif) |
Hi David,
a gothic trefoil is basically an equilateral triangle with circles
inscribed into the corners that meet in the triangle's midpoint.
Mark (aka LibraryMan aka LinuxLibrarian) asked for the construction
of these circles (thread started 12 June 2003). I described this
to him, so *I* know about incircles and all the other stuff :-)
In your macros you always create a variable to return the result --
this is not neccessary, simply return the expression that gives
the result. Enclose this expression in parentheses if neccessary
to avoid unwanted precedences. For example your
#macro Pythag(a,b)
#local py = sqrt(a*a+b*b);
py
#end
might be rewritten as
#macro Pythag(a,b)
sqrt(a*a+b*b)
#end
Here parentheses are required:
#macro Successor(N)
(N+1)
#end
else the expression 2*Successor(N) would result in 2*N+1 which is
interpreted as (2*N)+1 due to the priority of * over +.
Using all-lowercase identifiers is a bit dangerous. If you want
"future-proof" macros, no such variables should be used to avoid
conflicts with current or future keywords and with keywords of
unofficial versions of POV-Ray.
Sputnik
Post a reply to this message
|
![](/i/fill.gif) |