Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / dilate object function

Author
Message
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Jun 2009 07:28
just a cool function i made while playing with 3d mesh memblocks

when used on an object centered over 0,0,0 (in terms of offset) this works exactly like a scale (except it applys it to a new object)

but when used on an object offset then it will expand that offset in the same fashion you dilate a 2d figure, out and away from a point, except this only dilates away fro 0,0,0 (again in offset terms)

so if you create a sphere of size 10, then use offset limb obj,0,0,0,20 (move the main limb 20 units forward on the z axis) then dilate it to a scale of 300 (in terms of percent) then it will create a new object 3 times the size of the orignal and will be centered over 0,0,60 (offset terms)

the parameters are as follows:

objectnum - the object being dilated
scale - the scale (in terms of percent, 100 means same size)
newobjectnum - the object number of the dilated object
cullflipflag - set to 0 if you wish to be able to see the figure from the inside as opposed to from outside it)



run this to see what it does:



There are only 10 kinds of people in the world, those who understand binary and those who dont

Login to post a reply

Server time is: 2025-06-08 11:34:23
Your offset time is: 2025-06-08 11:34:23