|
![](/i/fill.gif) |
"Anthony D. Baye" <Sha### [at] spamnomore hotmail com> wrote:
> I've been working on an object for a WIP, and I originally wanted to model it as
> an isosurface. I have thought of two different ways of describing the surface
> unfortunately, one is far from precise and the other doesn't seem to translate
> well when I make the calculations into functions.
>
> #version 3.7;
> #include "math.inc"
>
> #default {
> pigment { rgb <0.07,0.37,0.75> }
> finish { ambient 0 }
> }
>
> #local N = 6;
> #local R0 = 2;
> #local S = 2 * pow( sin(pi/(2*N)), 2 );
> #local A = R0 - S;
> #local r = 360 / P;
> #local l = 90 - r/2;
> #local dS = 0.0625; // S = RT --> T = S/R tf. dT = dS/R
> #for(H,-2,2,0.03125)
> #for(T,0,360,1)
this should be #for(T,0,360,degrees(dS/R))
that's what I get for typing it from memory while I'm tired.
Regards,
A.D.B.
Post a reply to this message
|
![](/i/fill.gif) |