POV-Ray : Newsgroups : povray.advanced-users : opposite direction of a surface. : opposite direction of a surface. Server Time
28 Jul 2024 22:19:16 EDT (-0400)
  opposite direction of a surface.  
From: Matthew Pace
Date: 12 Nov 2003 21:33:03
Message: <matt-pace-117401.18330112112003@netplex.aussie.org>
Hello, the name is Matt, and this is my first post in the advanced user 
area.  Normally I am found asking annoying questions in the newuers 
area, but I feel that this question may be enough to bump me up a level, 
at least temporarily.

So here is the question(s):

How would one get the directional vector of an object so that the vector 
would lead an object directly away from the surface of the first one.  
This probably sounds confusing, so here is an example.  We have a torus, 
and a point on the torus, which well call v1.  How would I get a 
vector(v2) that if added to the vector(v1) of the point on the torus, 
and used for a cylinder would create a spikey torus with cylinders 
alawys pointing away from the surface.  I know that for this example I 
could just use a bigger torus and find the size ratio to locate certain 
points on the fatter, larger torus and use those, but I actually have 
something more complex on mind, so I was hoping you could help with that.

A second, similar question has been plaguing me.  This should perhaps go 
into the programming section, so if no one answers me, or anyone 
repremands me, I will repost it there.  I am working on my own 
raytracer, currently just pseudo-code.  How would I find, using 
mathmatical terms here, the angle that a ray reflects off a surface?  It 
is somewhat similar, but the ray may be coming off an angle, so theres 
gotta be some difference.  Any help with this would be great, I did 
check the source code, and found it to be rather sloppy and poorly 
documented for semi-professional software (no offence to anyone, my code  
is usually worse).

Thanks to all who help out here!
~matt


Post a reply to this message

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