POV-Ray : Newsgroups : povray.general : help w/simple macro : help w/simple macro Server Time
9 Aug 2024 19:35:25 EDT (-0400)
  help w/simple macro  
From: ross litscher
Date: 19 May 2000 16:36:30
Message: <3925A6B6.CB89CD94@osu.edu>
Hi, ive recently been trying to ween myself off modellers and do some
hand coding. So I made a simple macro as practice, well.. it's short so
here it is. (my_spike is just a cone really)

#macro Make_Grid (spacing, size)

	#local grid = 0;
	#while (grid < size)
	
		#local zee = spacing * grid;
		#local copy = 0;
	
		#while (copy < size)
		object {
			my_spike
			translate <spacing*copy, 0, zee> 
			}
		#local copy = copy + 1;
		#end	

	#local grid = grid + 1;
	#end
	//A cheap fix for it not putting a cone at <0,0,0>
	object { my_spike }
#end

then i do:

#declare Grid_1 = Make_Grid(.5, 2)

and this renders and all. But how do I do anything with Grid_1 now? Say
I want to 
rotate it 45*x and translate it 3*y. 

Am I doing things at all close to correct? Thanks for the help...


Ross


Post a reply to this message

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