POV-Ray : Newsgroups : povray.binaries.animations : can someone please point me to ... : macro putto Server Time
4 Nov 2024 13:12:45 EST (-0500)
  macro putto  
From: m o p s
Date: 22 Jan 2001 06:05:52
Message: <3a6c1410@news.povray.org>
I recently rewrite a macro to easily place an object maybe it can help you
or inspire you

The syntax is like :

object { Yourobject transform
putto(refA,refB,norm1,newA,newB,norm2,option) }

refA and ref B  : two points used as starting position
norm1 : if the object need to be oriented this vector is orthogonal to
vector(ptB-ptA)

newA , new B ,norm2  : final position
option : scling type ( 0 uniform scaling )

example :
"fleche" is an arrow build between the points -1*x, 1*x
to place it between two points A and B write :

object { fleche transform putto(-1*x,1*x,0,A,B,0,0) material { example }}

"normal vector" are 0 because fleche don't need orientaion : it is an object
of revolution

I use this macro a lot to copy a same object between multiple position.

I hope this could help

Sorry for my english


Post a reply to this message


Attachments:
Download 'img0.jpg' (3 KB) Download 'img1.jpg' (3 KB) Download 'img2.jpg' (5 KB) Download 'macroputto.inc.txt' (7 KB) Download 'mopspatch.inc.txt' (15 KB) Download 'putto_ex.pov.txt' (4 KB)

Preview of image 'img0.jpg'
img0.jpg

Preview of image 'img1.jpg'
img1.jpg

Preview of image 'img2.jpg'
img2.jpg

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