|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I tried to make two ellipsoids at the opposite corner of a cube.
box { <3,3,3>,<-3,-3,-3>,
pigment { color Red }
}
sphere { <3,3,3>,1
pigment { color Blue }
scale <2,0,0>
}
sphere { <-3,-3,-3>,1
pigment { color Blue }
scale <2,0,0>
}
"scale" stretchs the sphere twice longer along the x-axis.
but the center coordinate of ellipsoid is stretched as well.
They should at the <3,3,3> and <-3,-3,-3> but they are at <6,3,3> and
<-6,-3,-3>
How can I make ellipsoid at the exact place?
Cheers
JH
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
44e88137@news.povray.org...
> "scale" stretchs the sphere twice longer along the x-axis.
>
> but the center coordinate of ellipsoid is stretched as well.
>
> They should at the <3,3,3> and <-3,-3,-3> but they are at <6,3,3> and
> <-6,-3,-3>
>
> How can I make ellipsoid at the exact place?
>
> Cheers
>
> JH
>
>
If you create your spheres a <0,0,0> , stretch them , THEN translate them at
<3,3,3> and <-3,-3,-3>, they'll be where you want
Marc
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In POVRay all transformations (translating, scaling and rotating) are in
relation to the origin. So scaling an object which isn't located at the
origin will also scale its position. An object not located at the origin
will 'orbit' around the coordinate axes when being rotated.
Hence: Create the objects at the center, scale/rotate there and translate
afterwards.
Also it should be scale <2,1,1> instead of <2,0,0>. POVRay should print out
a warning message about that issue.
box { <3,3,3>,<-3,-3,-3>,
pigment { color Red }
}
sphere { <0,0,0>,1
pigment { color Blue }
scale <2,1,1>
translate <3,3,3>
}
sphere { <0,0,0>,1
pigment { color Blue }
scale <2,1,1>
translate <-3,-3,-3>
}
or somewhat shorter:
box { -3, 3
pigment { color Red }
}
sphere { 0,1
pigment { color Blue }
scale 2*x
translate 3
}
sphere { 0,1
pigment { color Blue }
scale 2*x
translate -3
}
Hope this helps
Regards Roman
Post a reply to this message
|
|
| |
| |
|
|
From: Tim Attwood
Subject: Re: how to make an ellipsoid at exact place?
Date: 20 Aug 2006 20:04:15
Message: <44e8f87f@news.povray.org>
|
|
|
| |
| |
|
|
Mathematically, if you scale-down a sphere in y
to become an ellipsoid, the foci along the x-axis become
+- MR*e*sqrt(-e/(e*e-1))
where e is the eccentricity (scale amount), and
where MR is the major radius.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|