|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello All
Is it possible to create an elliptical torus with a varying major diameter
and a constant minor diameter?
Thanx,
tgl
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"tgl" <aub### [at] sympaticoca> wrote:
> Hello All
> Is it possible to create an elliptical torus with a varying major diameter
> and a constant minor diameter?
> Thanx,
> tgl
it should be possible with isosurfaces. see e.g.
http://www.econym.demon.co.uk/isotut/variable.htm
Another possibility would be to approximate the surface with a spheresweep,
see 2.4.1.10 Sphere Sweep
http://www.povray.org/documentation/view/3.6.1/284/
Regards Roman
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.4405855061f3c539f37ab23e0@news.povray.org>,
"Roman Reiner" <lim### [at] gmxde> wrote:
> "tgl" <aub### [at] sympaticoca> wrote:
> > Hello All
> > Is it possible to create an elliptical torus with a varying major diameter
> > and a constant minor diameter?
> > Thanx,
> > tgl
>
> it should be possible with isosurfaces. see e.g.
> http://www.econym.demon.co.uk/isotut/variable.htm
> Another possibility would be to approximate the surface with a spheresweep,
> see 2.4.1.10 Sphere Sweep
> http://www.povray.org/documentation/view/3.6.1/284/
>
> Regards Roman
as roman say, i think using sphere sweep is a right solution. computing
points of an ellipse is easy.
--
klp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"tgl" <aub### [at] sympaticoca> wrote:
> Hello All
> Is it possible to create an elliptical torus with a varying major diameter
> and a constant minor diameter?
> Thanx,
> tgl
or approximate it by connecting spheres and cylinders. May render faster?
H
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"tgl" <aub### [at] sympaticoca> wrote:
> Hello All
> Is it possible to create an elliptical torus with a varying major diameter
> and a constant minor diameter?
> Thanx,
> tgl
I was looking to use the torus object statement and incorperate a
mathematical formula to create an oval shape of what ever dimensions and
keep the torus cylinder itself a constant diameter. Scaling a torus doesn't
work.
Anyone know a formula that may work?
Again thank you,
tgl
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Roman Reiner who wrote:
>"tgl" <aub### [at] sympaticoca> wrote:
>> Hello All
>> Is it possible to create an elliptical torus with a varying major diameter
>> and a constant minor diameter?
>> Thanx,
>> tgl
>
>it should be possible with isosurfaces. see e.g.
>http://www.econym.demon.co.uk/isotut/variable.htm
>Another possibility would be to approximate the surface with a spheresweep,
>see 2.4.1.10 Sphere Sweep
>http://www.povray.org/documentation/view/3.6.1/284/
I've tried to achieve the effect by modifying the "surface of
revolution" isosurface technique, but everything that changes the major
diameter seems to have a side effect that changes the shape of the minor
cross section.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
does this work for you?
camera {
location <-5,15,-10>
look_at 0
angle 45
}
light_source {
<-5,15,-10>
rgb 1
}
#local a = 5; //semimajor axis
#local b = 3; //semiminor axis
#local r = .5; //minor radius
#local n = 20;//number of spheres/accuracy of object
sphere_sweep {
cubic_spline
n+3,
#local i=0;
#while(i<=2*pi*(1+2/n))
<a*sin(i),0,b*cos(i)>, r
#local i=i+(2*pi/n);
#end
pigment { rgb y }
finish { phong 1 }
}
Regards Roman
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Roman Reiner" <lim### [at] gmxde> wrote:
> does this work for you?
>
> camera {
> location <-5,15,-10>
> look_at 0
> angle 45
> }
> light_source {
> <-5,15,-10>
> rgb 1
> }
>
> #local a = 5; //semimajor axis
> #local b = 3; //semiminor axis
> #local r = .5; //minor radius
>
> #local n = 20;//number of spheres/accuracy of object
>
> sphere_sweep {
> cubic_spline
> n+3,
> #local i=0;
> #while(i<=2*pi*(1+2/n))
> <a*sin(i),0,b*cos(i)>, r
> #local i=i+(2*pi/n);
> #end
> pigment { rgb y }
> finish { phong 1 }
> }
>
> Regards Roman
Tried the above and as is, it looks good but then I tried the following
variation...
camera {
location <0,0,-10>
look_at 0
}
light_source {
<-5,15,-10>
rgb 1
}
#local a = 5; //semimajor axis
#local b = 3; //semiminor axis
#local r = .5; //minor radius
#local n = 20;//number of spheres/accuracy of object
sphere_sweep {
cubic_spline
n+3,
#local i=0;
#while(i<=2*pi*(1+2/n))
<a*sin(i),0,b*cos(i)>, r
#local i=i+(2*pi/n);
#end
pigment { rgb y }
finish { phong 1 }
rotate <-90,0,0>
}
Is there some kind of distortion happening here or am I seeing things. I
really need an accurate and consistant shape.
tgl
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi!
I worked on the problem and I posted in p.b.i + p.b.s-f a solution with
sphere_sweep, and also with a blob (fast render) with a constant behaviour
(I think ..). Your problem might come from the use of the parametric form
of an ellipse, which gives non-constant spacing between samples on the
perimeter from regular parametric values, or/and perhaps from the use of too
few control points in the spline.
The blob macro I posted uses also the parametric equation, but travels along
the perimeter by oversampling, an drops a blob element every constant
spacing, giving quite good results. I hope thi will help, and I am sure
that what I did can be very much improved.
Bruno
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it tgl who wrote:
> Is there some kind of distortion happening here or am I seeing things. I
>really need an accurate and consistant shape.
It's an optical illusion caused by the fact that you see more shadow on
the horizontal parts, and the shadow is the same colour as the
background.
If you run that test with a white background the illusion goes away and
you can see that the real shape is consistent.
background {rgb 1}
You can easily check the accuracy by adding some spheres with a slightly
larger radius along the ellipse, and observing that they all fit
properly.
camera {
location <0,0,-10>
look_at 0
}
light_source {
<-5,15,-10>
rgb 1
}
#local a = 5; //semimajor axis
#local b = 3; //semiminor axis
#local r = .5; //minor radius
#local n = 20;//number of spheres/accuracy of object
sphere_sweep {
cubic_spline
n+3,
#local i=0;
#while(i<=2*pi*(1+2/n))
<a*sin(i),0,b*cos(i)>, r
#local i=i+(2*pi/n);
#end
pigment { rgb y }
finish { phong 1 }
rotate <-90,0,0>
}
background {rgb 1}
#local i=0;
#while(i<=2*pi*(1+2/n))
sphere{<a*sin(i),b*cos(i),0>, r+0.001 pigment {rgb <2,2,0>}}
#local i=i+(2*pi/n);
#end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |