home *** CD-ROM | disk | FTP | other *** search
- /* CMD: RockGen
- *
- * Test requester from ARexx to Modeler.
- */
-
- /* trace results */
-
- address "LWModelerARexx.port"
- libadd = addlib("LWModelerARexx.port",0)
-
- check = addlib("rexxmathlib.library",0,-30,0)
-
- /* -- Main code body -- */
-
- say "rockgen.lwm"
- call req_begin "Bony's Rock Generator"
-
-
- id6 = req_addcontrol("Rock Segments",'N',0)
-
- call req_setval id6, 8
-
- x = req_post()
- if (x) then do
- say "Ok"
- say req_getval(id6)
- suck = req_getval(id6)
- say
-
-
-
- boxshape = " l-1 "||"h1 "||"n"||suck
- sphereshape = " center0 radius1 nsides"||suck||" nsegments"||suck
-
-
- /* MAKEBOX||boxshape */
- MAKEBALL||sphereshape
-
-
- say ket
- say sphereshape
- Jitx = RANDOM(500,600,time('s'))
- Jity = RANDOM(650,950,time('s'))
- Jitz = RANDOM(500,600,time('s'))
- ROT1 = RANDOM(30,160,time('s'))
- ROT2 = RANDOM(30,160,time('s'))
- ROT3 = RANDOM(10,170,time('s'))
- jitx = jitx * .001
- jity = jity * .001
- jitz = jitz * .001
-
- Jitstr = " "||jitx||" "||jity||" "||jitz
- JITTER||Jitstr
- Centstr1 = " center0"||" axis Y"||" angle"||ROT1
- Centstr2 = " center0"||" axis X"||" angle"||ROT2
- Centstr3 = " center0"||" axis Z"||" angle"||ROT3
- ROTATE||Centstr1
- ROTATE||Centstr2
- JITTER||Jitstr
- say jitstr
- ROTATE||Centstr3
- if suck < 2 then suck = 2
- dropsuck = suck - 3
- if dropsuck < 1 then dropsuck=1
- do dropsuck
- SMOOTH s2 i20
- say dropsuck
- end
- jitx = jitx * .15
- jity = jity * .15
- jitz = jitz * .15
-
- Jitstr = " "||jitx||" "||jity||" "||jitz
- JITTER||Jitstr
-
- say jitstr
- say Centstr1
- say Centstr2
- say Centstr3
- end; else say "Canceled"
-
- /* -- End Main code -- */
-
- if (libadd) then call remlib("LWModelerARexx.port")
- exit
-