|
|
I wanted to use sphere_sweep to generate a scalled torus, like
torus { 10,5 scale <4,1,1>
*but* I wanted it's section to be a circle (and not to get deformed)
- so I wanted an cylinder wrapped into elipse shape.
But usig sphere sweep didnt help:
http://www.raf256.com/3d/torus_as_spline.jpg
as we see in "yellow" segment - section is deformed.
is this a bug or a is this expected behaviour of sphere_sweep?
Sweep is build from points spaced equaly along scalled torus shape:
sphere_sweep {
linear_spline //cubic_spline
#local E=45/4; // precission
(360/E)+3
#local I=-E; #while (I<=360+E)
vrotate(<0,0,Major>, <0,I,0>)*Scale, Minor
#local I=I+E; #end
}
Post a reply to this message
|
|
|
|
On 6 May 2003 13:52:05 -0400, "Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote:
> I wanted to use sphere_sweep to generate a scalled torus, like
> torus { 10,5 scale <4,1,1>
> *but* I wanted it's section to be a circle (and not to get deformed)
> - so I wanted an cylinder wrapped into elipse shape.
>
> But usig sphere sweep didnt help:
> http://www.raf256.com/3d/torus_as_spline.jpg
First of all your filename shows that you do not understand that torus can't be
spline. Spline is not object. Sphere_sweep is not spline.
> as we see in "yellow" segment - section is deformed.
Is top object viewed from top ? Then presented crossection is what you asked
for. Think about it.
If I understand your intentions corectly the only ideal solution here is some
playing with functions and using it in isosurface.
ABX
Post a reply to this message
|
|
|
|
"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in
news:Xns### [at] 204213191226:
> I wanted to use sphere_sweep to generate a scalled torus, like
> torus { 10,5 scale <4,1,1>
> *but* I wanted it's section to be a circle (and not to get deformed)
> - so I wanted an cylinder wrapped into elipse shape.
>
> But usig sphere sweep didnt help:
> http://www.raf256.com/3d/torus_as_spline.jpg
>
> as we see in "yellow" segment - section is deformed.
>
> is this a bug or a is this expected behaviour of sphere_sweep?
>
> Sweep is build from points spaced equaly along scalled torus shape:
>
> sphere_sweep {
> linear_spline //cubic_spline
> #local E=45/4; // precission
> (360/E)+3
> #local I=-E; #while (I<=360+E)
> vrotate(<0,0,Major>, <0,I,0>)*Scale, Minor
> #local I=I+E; #end
> }
Try this Rafal:
#declare Major = 5.0;
#declare Minor = 1.5;
#declare Scale = <3.0, 1.0, 0.5>;
difference {
union {
#declare I = 0;
#while (I < 360)
sphere { Scale*vrotate(Major*z, I*y), Minor }
#declare I = I + 1;
#end // while
pigment { color rgb <1, 1, 1> }
}
plane { z, 0 pigment { color rgb <1, 1, 0> } }
}
camera { location -30*z look_at 0*y }
light_source { <1, 4, -4>*100 color rgb <1, 1, 1> shadowless }
background { color rgb <0.5, 0.5, 1> }
Tor Olav
Post a reply to this message
|
|