POV-Ray : Newsgroups : povray.general : Spheresweep problem Server Time
25 Dec 2024 13:51:56 EST (-0500)
  Spheresweep problem (Message 1 to 4 of 4)  
From: Rafal 'Raf256' Maj
Subject: Spheresweep problem
Date: 6 May 2003 13:52:05
Message: <Xns9373CA1FF9BCCraf256com@204.213.191.226>
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

From: ABX
Subject: Re: Spheresweep problem
Date: 6 May 2003 14:20:05
Message: <1rufbvol97bieuhp090nop1huuva7vjmer@4ax.com>
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

From: Slime
Subject: Re: Spheresweep problem
Date: 6 May 2003 14:37:43
Message: <3eb800f7@news.povray.org>
> as we see in "yellow" segment - section is deformed.

The sphere sweep is correct. Every point on the surface of the sphere sweep
is an equal distance from the nearest point on the sphere sweep's spline.
Note that said point on the spline may not be within the yellow box you
created.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Spheresweep problem
Date: 6 May 2003 20:04:51
Message: <Xns937415EAB918torolavkhotmailcom@204.213.191.226>
"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

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