POV-Ray : Newsgroups : povray.binaries.images : Need a belt ? : Need a belt ? Server Time
4 Nov 2024 13:57:50 EST (-0500)
  Need a belt ?  
From: m o p s
Date: 7 Aug 2000 06:51:28
Message: <398e94b0@news.povray.org>
Here is a second macro i have made.
It build a belt between two wheels ( so i named it "buildbelt" )
and it could make it roll ( i will post two animations for example at
p.b.a )


Note : the macros are in "mopspatch.inc" ( see
http://perso.wanadoo.fr/mops/atelier.htm )
and feel free to use, rewrite and improve them, there is no copyrigth !


The syntax is like :

#declare belt_R1=3;    /* radius of the first wheel, his center is O
#declare belt_R2=5;    /* the second one
#declare belt_d=10;    /* distance between the two wheels
#declare belt_nb=30;    /* number of elements
#declare belt_tour=-1;    /* number of revolution when clock go from 0 to 1
#declare belt_typ=2;    /* if 1 belt_tour is the number of revolution of the
wheel
                                    /*if 2 belt_tour is the number of
revolution of the belt
#declare belt_norm=y; /* for the orientation of the elements

/* definition of the elements :

#declare k=1;
#while (k<belt_nb+1)
                               #declare
belt_el[k]=object{maillon(Steel,Alu4)
                                                    scale <1,2,1
>material{ecran}}
  /* maillon is an object created in my mopspatch.inc, it is an example
#declare k=k+1;
#end

object { buildbelt(clock) }

it give back four variables :
belt_al :  belt angle ( usefull to put the belt on a floor )
belt_Long : belt length
belt_Dl=  length of one element
belt_R1bis  : to calculate the visible radius of the wheel
belt_R2bis

Hope i am understable,
--
My Own Private Square.
http://perso.wanadoo.fr/mops/


Post a reply to this message


Attachments:
Download 'belts.jpg' (25 KB) Download 'belt_ex1.jpg' (21 KB) Download 'mopscar.jpg' (16 KB)

Preview of image 'belts.jpg'
belts.jpg

Preview of image 'belt_ex1.jpg'
belt_ex1.jpg

Preview of image 'mopscar.jpg'
mopscar.jpg


 

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