POV-Ray : Newsgroups : povray.general : Oval Shape Server Time
11 Aug 2024 07:11:56 EDT (-0400)
  Oval Shape (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Kenny Pyatt
Subject: Oval Shape
Date: 31 Aug 1999 13:03:17
Message: <37CAB99E.93CB3A0C@dshack.com>
This question maybe a simple one to the experts but I can't seem to make
a simple oval.  I can make a chain link by taking the difference of a
torus and adding cylinders, I can make a torus.  But I can't figure out
the way I am supposed to strech the torus into an oval.  Please tell
me.  I am sure it is simple.

--
Kenny Pyatt


Post a reply to this message

From: Ken
Subject: Re: Oval Shape
Date: 31 Aug 1999 13:19:48
Message: <37CC0E78.352544AD@pacbell.net>
Kenny Pyatt wrote:
> 
> This question maybe a simple one to the experts but I can't seem to make
> a simple oval.  I can make a chain link by taking the difference of a
> torus and adding cylinders, I can make a torus.  But I can't figure out
> the way I am supposed to strech the torus into an oval.  Please tell
> me.  I am sure it is simple.
> 
> --
> Kenny Pyatt

Uneven scaling is one way to do this. If for example you were looking
through the hole of a torus in front of the camera scale it:

 scale<1, 1.5, 1>

Or try something like this for one link:

camera { location 6*-z  look_at 0}
light_source { 6*-z rgb 1}


#declare Torus_Part =
intersection {
 torus{1,.25 rotate 90*-x}
 plane{y,0}
}

#declare Link =
union{
object{Torus_Part translate y*-.5}
object{Torus_Part rotate 180*x translate y*.5}
cylinder{y*-.5, y*.5, 0.25 translate x*-1}
cylinder{y*-.5, y*.5, 0.25 translate x* 1}
pigment{rgb 1}}

object { Link }

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Bob Hughes
Subject: Re: Oval Shape
Date: 31 Aug 1999 13:40:30
Message: <37cc138e@news.povray.org>
An oval using the torus is not going to turn out right unless you use
Kens second method. Uneven scaling is one thing, procedural-type
scaling is another, of which POV-Ray is unable to do. Another
possibility is to string together spheres or blob components along a
spline path, just not as efficient.

Bob

Ken <tyl### [at] pacbellnet> wrote in message
news:37CC0E78.352544AD@pacbell.net...
>
>
> Kenny Pyatt wrote:
> >
> > This question maybe a simple one to the experts but I can't seem
to make
> > a simple oval.  I can make a chain link by taking the difference
of a
> > torus and adding cylinders, I can make a torus.  But I can't
figure out
> > the way I am supposed to strech the torus into an oval.  Please
tell
> > me.  I am sure it is simple.
> >
> > --
> > Kenny Pyatt
>
> Uneven scaling is one way to do this. If for example you were
looking
> through the hole of a torus in front of the camera scale it:
>
>  scale<1, 1.5, 1>
>
> Or try something like this for one link:
>
> camera { location 6*-z  look_at 0}
> light_source { 6*-z rgb 1}
>
>
> #declare Torus_Part =
> intersection {
>  torus{1,.25 rotate 90*-x}
>  plane{y,0}
> }
>
> #declare Link =
> union{
> object{Torus_Part translate y*-.5}
> object{Torus_Part rotate 180*x translate y*.5}
> cylinder{y*-.5, y*.5, 0.25 translate x*-1}
> cylinder{y*-.5, y*.5, 0.25 translate x* 1}
> pigment{rgb 1}}
>
> object { Link }
>
> --
> Ken Tyler
>
> See my 850+ Povray and 3D Rendering and Raytracing Links at:
> http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Ken
Subject: Re: Oval Shape
Date: 31 Aug 1999 14:26:06
Message: <37CC1E03.483C861@pacbell.net>
Ken wrote:

> Uneven scaling is one way to do this. If for example you were looking
> through the hole of a torus in front of the camera scale it:
> 
>  scale<1, 1.5, 1>

Adding to my previous post if you want the links elongated more so than
the script I posted before you can try the following script. I also added
a method of linking the links together with the proper rotations.

camera { location 12*-z  look_at 0}
light_source { 60*-z rgb 1}

#declare Torus_part =
intersection {
 torus{1,.25 rotate 90*-x}
 plane{y,0}
}

#declare Link =
union{
object{Torus_part translate y*-.5}
object{Torus_part rotate 180*x translate y*.5}
cylinder{y*-.5,y*.5,0.25 translate x*-1}
cylinder{y*-.5,y*.5,0.25 translate x*1}
pigment{rgb 1}}

union{
 #declare a=0;
 #while(a<10)
   object { Link
            scale     0.5 
            translate y*-5 
            rotate    y*90*a 
            translate y*1.2*a
  }
 #declare a=a+1;
 #end
  scale<.5,1,.5>
  rotate 45*y
}

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Mark Wagner
Subject: Re: Oval Shape
Date: 1 Sep 1999 00:52:04
Message: <37ccb0f4@news.povray.org>
Kenny Pyatt wrote in message <37CAB99E.93CB3A0C@dshack.com>...
>This question maybe a simple one to the experts but I can't seem to make
>a simple oval.  I can make a chain link by taking the difference of a
>torus and adding cylinders, I can make a torus.  But I can't figure out
>the way I am supposed to strech the torus into an oval.  Please tell
>me.  I am sure it is simple.


A true oval cannot be created by scaling a torus.  If you scale a torus, you
get an elliptical torus.  An oval is composed of four arcs, so a ovoidal(?)
torus would be composed of four sections of tori in two different sizes.

Mark


Post a reply to this message

From: Nieminen Juha
Subject: Re: Oval Shape
Date: 1 Sep 1999 04:08:28
Message: <37ccdefc@news.povray.org>
Mark Wagner <mar### [at] gtenet> wrote:
: A true oval cannot be created by scaling a torus.

  Perhaps I'll think about how to do it with a poly-object. It looks like
it will need a 6th degree polynomial (since the regular torus need a 4th
degree one)...

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Mr  Art
Subject: Re: Oval Shape
Date: 1 Sep 1999 12:32:30
Message: <37CD54FE.76230D45@gci.net>
Isn't the equation for a 2D oval/ellips something like
(x^2)/a + (y^2)/b = 0? A circle is x^2+y^2=0.
Couldn't we find the part of the torus discription
that deals with the major radius and add the division
parts?

Nieminen Juha wrote:

> Mark Wagner <mar### [at] gtenet> wrote:
> : A true oval cannot be created by scaling a torus.
>
>   Perhaps I'll think about how to do it with a poly-object. It looks like
> it will need a 6th degree polynomial (since the regular torus need a 4th
> degree one)...
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Mark Wagner
Subject: Re: Oval Shape
Date: 2 Sep 1999 00:24:26
Message: <37cdfbfa@news.povray.org>
Mr. Art wrote in message <37CD54FE.76230D45@gci.net>...
>Isn't the equation for a 2D oval/ellips something like
>(x^2)/a + (y^2)/b = 0? A circle is x^2+y^2=0.
>Couldn't we find the part of the torus discription
>that deals with the major radius and add the division
>parts?


An oval is not an ellipse, they just look similar.  An oval is easier to
draw freehand, but an ellipse is easier to create mathematically.

Mark


Post a reply to this message

From: Mr  Art
Subject: Re: Oval Shape
Date: 2 Sep 1999 00:35:06
Message: <37CDFE45.9B214917@gci.net>
Point taken. But is there someone out there that can point out the
places in the code to put the values a and b in something like
this?
// Torus having major radius sqrt(40), minor radius sqrt(12)
#declare Torus=
quartic {
 <
    1,   0,   0,   0,   2,   0,   0,
    2,   0,-104,   0,   0,   0,   0,
    0,   0,   0,   0,   0,   0,   1,
    0,   0,   2,   0,  56,   0,   0,
    0,   0,   1,   0, -104,  0, 784
 >
 sturm
 pigment{White}
 }
This is almost stright form the docs.

Mark Wagner wrote:

> Mr. Art wrote in message <37CD54FE.76230D45@gci.net>...
> >Isn't the equation for a 2D oval/ellips something like
> >(x^2)/a + (y^2)/b = 0? A circle is x^2+y^2=0.
> >Couldn't we find the part of the torus discription
> >that deals with the major radius and add the division
> >parts?
>
> An oval is not an ellipse, they just look similar.  An oval is easier to
> draw freehand, but an ellipse is easier to create mathematically.
>
> Mark


Post a reply to this message

From: Nieminen Juha
Subject: Re: Oval Shape
Date: 2 Sep 1999 03:22:25
Message: <37ce25b1@news.povray.org>
Mr. Art <mr.### [at] gcinet> wrote:
: Point taken. But is there someone out there that can point out the
: places in the code to put the values a and b in something like
: this?

  It's not as easy as "putting the values a and b in this".
  I have been calculating polynomials (man, I wish I got some mathematical
program to help me; typing polynomials by hand is tedious) and it seems
to be impossible.
  If I'm correct, a perfect elliptical torus would require a 8th degree
polynomial (a very simple explanation of this is that it's because the torus
is a 4th degree polynomial and you have to raise it to the power of 2).
Povray can only handle polynomials up to the 7th degree. Bad luck.
  A non-perfect elliptical torus (ie. the minor radius does not stay
constant along the torus) may require only a 6th degree polynomial (note:
this torus is not the same as a scaled torus; the minor radius would be
the same at both axes of symmetry; the radius will differ at the "corners").

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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