|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Will someone please tell me why the following code renders as it does?
(place a camera at <0,0,-12>)
sphere{<0,0,0>,5 pigment{rgbf<0,0,1,.5>}}
sphere{<0,0,0>,2.5 translate -2.5*x pigment{rgbt<1,1,0,.5>}}
sphere{<0,0,0>,2.5 translate 2.5*x pigment{rgbt<1,1,0,.5>}}
gives me the image attached. now; is it me, or, shouldn't the edges of the
small spheres meet perfectly with the edge of the big sphere? I say this is
a stupidity problem simply because, well, it's obviously something simple
i'm not getting.
--
Mike Metheny
lon### [at] vtedu
mik### [at] loneshepherdcom
http://www.loneshepherd.com/
"When one's words are no better than silence, one should keep silent."
Post a reply to this message
Attachments:
Download 'problem.jpg' (13 KB)
Preview of image 'problem.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Metheny wrote:
>
> Will someone please tell me why the following code renders as it does?
> (place a camera at <0,0,-12>)
>
> sphere{<0,0,0>,5 pigment{rgbf<0,0,1,.5>}}
> sphere{<0,0,0>,2.5 translate -2.5*x pigment{rgbt<1,1,0,.5>}}
> sphere{<0,0,0>,2.5 translate 2.5*x pigment{rgbt<1,1,0,.5>}}
>
> gives me the image attached. now; is it me, or, shouldn't the edges of the
> small spheres meet perfectly with the edge of the big sphere? I say this is
> a stupidity problem simply because, well, it's obviously something simple
> i'm not getting.
>
> --
>
> Mike Metheny
You are correct in assuming the misconception on your part was the key
player in this little drama. A sphere represented as:
sphere { <0,0,0>, 1 = a sphere "2" units across !!!
A sphere with a radius of 1 is 2 units across. The sphere object
is defined by it's radius and not it's diameter. With this in mind
you can see where your large sphere is 10 units wide ( 5*-x and 5*x)
and each of the two 2.5 unit spheres are suffering the same fate.
To have them kiss surfaces at the outside edge of the larger sphere
your translate values should be 7.5 and not 2.5 as used above.
Beware of the same trap with the box object. If you specify it
as box { <-1,-1,-1>,<1,1,1> } you will have a box that is 2 units
wide and not one unit like it might appear at a glance. Where the
comma is between the two fields can be though of as your origin line.
The illustrated example shows you are designating the objects walls
at -1, +1 from that origin point. 1 + 1 = 3 : )
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
<< You are correct in assuming the misconception on your part was the key
player in this little drama. A sphere represented as:
sphere { <0,0,0>, 1 = a sphere "2" units across !!!
>>
Yes I understand this Ken. But is not a sphere, sphere{<0,0,0>,5} centered
by default at the origin? So, it extends, 5 units up, 5 down, 5 left, 5
right, 5 in, 5 out. it is completely centered. Thus; by making a sphere
radius 2.5 (diameter 5) by translating it by it's radius to the right, the
left edge should be at the origin, and the right edge should be at 5,0,0
correct? In this image it does not appear that way.
--
Mike Metheny
lon### [at] vtedu
mik### [at] loneshepherdcom
http://www.loneshepherd.com/
"When one's words are no better than silence, one should keep silent."
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
It's a question of perspective.
With, the camera setup the way it is, you are looking through a small
portion of the sphere in order to see the intersecting edges.
GrimDude
vos### [at] arkansasnet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I misunderstood the question. I thought that you wanted the two
smaller spheres outside the larger sphere, a set of three touching
in a line, which my explanation covered quite nicely thank you. As
Grim said if you can't see the forest through the trees remove the
forest for a better look. It appears you are getting shperical
aboration in the view of the interior of the larger sphere and
evaluations made this way will be invalid. It only takes a second
to comment out the larger sphere to see the two lesser spheres with
greater clarity.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sorry Ken, but you got your maths wrong here.
The spheres are scaled and translated correctly to give the expected result.
Actually, they *do* give the correct and expected result!
I agree with GrimDude: It is a problem of perspective.
The camera is so close to the outer sphere, that the near part is
perspectively magnified so much, that it appears larger than the X/Y-plane
"equator" which lies farther back (and where the sphere really *do* meet at
the edges as expected.
I attached a screenshot from Moray where I recreated the scene and then
marked the actual equator with red and the *percieved* outer edge with
yellow (front, side, top and perspective view).
So long,
Johannes.
Post a reply to this message
Attachments:
Download 'spheres.gif' (28 KB)
Preview of image 'spheres.gif'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Metheny wrote:
>
> Will someone please tell me why the following code renders as it does?
Try to use the orthographic camera which would eliminate the perspective
problem. If I remember correctly I have had this problem myself. The
solution is no good if you want the perspective, but it is good to use
when placing things in relation to eachother.
/Johan
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Johannes Hubert wrote:
>
> Sorry Ken, but you got your maths wrong here.
> The spheres are scaled and translated correctly to give the expected result.
> Actually, they *do* give the correct and expected result!
My math was 100% correct for what I wanted it to do. It was
my understanding of the original question that is at fault here.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>The camera is so close to the outer sphere, that the near part is
>perspectively magnified so much, that it appears larger than the X/Y-plane
>"equator" which lies farther back (and where the sphere really *do* meet at
>the edges as expected.
>
I was thinking of the set of solutions that satisfy a tangential line to the
point <-5,0,0> (assumed), but include the camera position. This set would be
null in that it cannot be satisfied from the current camera location, except
in orthographic projection (I think).
Perspective magnification, spherical aberration,....? Stymied...
Thanks for being agreeable. :)
GrimDude
vos### [at] arkansasnet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> My math was 100% correct for what I wanted it to do. It was
>my understanding of the original question that is at fault here.
>
>--
>Ken Tyler
>
>mailto://tylereng@pacbell.net
Yeah, the question wasn't very well put. Misleading in fact.
GrimDude
vos### [at] arkansasnet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|