|
|
So, following the logic from:
http://news.povray.org/povray.general/thread/%3Cweb.410eba6fcd20604ecbae57f30@news.povray.org%3E/?ttop=300207&toff=1950
just include transforms.inc, THEN redefine the "offending" macro:
#macro VPerp_To_Vector (v0)
#if (vlength(v0) = 0)
#local vN = <0, 0, 0>;
#else
#local x_point = vcross (x, v0);
#if (vlength (x_point) = 0)
#local x_point = vcross(y, v0); // if x was parallel to v0, try y instead
#end
#if (vlength (x_point) = 0)
#local x_point = vcross(z, v0); // if x was parallel to v0, try y instead
#end
#end
#local vN = x_point;
vN
#end
Then generate your random points, find your intersection point and normal
vector,
#declare Normal = <0, 0, 0>;
#local iPoint = TracePointA (Sphere, Loc, Normal);
object {Greeble Point_At_Trans (Normal) translate iPoint}
and you should be good.
Post a reply to this message
Attachments:
Download 'greeble_placement.png' (196 KB)
Preview of image 'greeble_placement.png'
|
|