|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
My maths isn't great, but I have what I would imagine is
a fairly simple ray tracing problem, I was wondering if anyone
here might have a solution, as I'm stuck.
I have a reflective sphere, location LocSphere, radius RadSphere.
I have a camera, location LocCamera, looking at the sphere.
I have an object, location LocObject that is visible as a reflection in
the sphere.
I need to know the point on the sphere that the reflection comes from
(the point that the camera could look at if it wanted to look directly
towards the reflection).
I naively thought the average of the vectors from the center of
the sphere to the camera and to the the object would pass through
the point on the surface of the sphere:
#declare VecSphereToObject = (LocObject - LocSphere);
#declare VecSphereToCamera = (LocCamera - LocSphere);
#declare VecAverage = vnormalize(VecSphereToObject + VecSphereToCamera);
#declare Solution = LocSphere + VecAverage * RadSphere;
but it's not right :-(
--
I would've gotten away with it too, if it wasn't for those pesky kids!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bill Hails wrote:
> I have a reflective sphere, location LocSphere, radius RadSphere.
>
> I have a camera, location LocCamera, looking at the sphere.
>
> I have an object, location LocObject that is visible as a reflection in
> the sphere.
>
> I need to know the point on the sphere that the reflection comes from
> (the point that the camera could look at if it wanted to look directly
> towards the reflection).
>
>
If I understand your problem correctly the soulution is equivalent to what
if have done some time ago. See
http://news.povray.org/povray.general/22853/
and
http://news.povray.org/povray.text.scene-files/23166/
- Micha
--
POV-Ray Objects Collection: http://objects.povworld.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Micha Riser wrote:
> Bill Hails wrote:
>
>> I have a reflective sphere, location LocSphere, radius RadSphere.
>>
>> I have a camera, location LocCamera, looking at the sphere.
>>
>> I have an object, location LocObject that is visible as a reflection in
>> the sphere.
>>
>> I need to know the point on the sphere that the reflection comes from
>> (the point that the camera could look at if it wanted to look directly
>> towards the reflection).
>>
>>
>
> If I understand your problem correctly the soulution is equivalent to what
> if have done some time ago. See
>
> http://news.povray.org/povray.general/22853/
> and
> http://news.povray.org/povray.text.scene-files/23166/
>
> - Micha
>
That's exactly what I was after, thanks very much!
--
I would've gotten away with it too, if it wasn't for those pesky kids!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|