ever wanted to make a sphere really split in 2 when it hit something? or maybe you needed a semisphere for some other reason... well now you can do it in DBP. No need to open the modelling program.Dedicated to all lazy programmers.
`make our nice semi sphere
make_object_semi_sphere(1,2,1)
`its a normal object ! you can color it etc
color object 1,rgb(255,0,0)
sync on:sync rate 0
do
sync
loop
`SEMI SPHERE function , third parameter
`is the portion you want to remove
`0 removes upper portion
`1 or anything above zero removes lower portion
function make_object_semi_sphere(objno,radius#,portion)
make object sphere objno,radius#
LOCK VERTEXDATA FOR LIMB objno,0
for V = 0 to GET VERTEXDATA VERTEX COUNT()-1
y# = GET VERTEXDATA POSITION Y(V)+object position y(objno)
if portion = 0
if y#> object position y(objno)
SET VERTEXDATA POSITION V, GET VERTEXDATA POSITION X(V),0, GET VERTEXDATA POSITION Z(V)
endif
else
if y#< object position y(objno)
SET VERTEXDATA POSITION V, GET VERTEXDATA POSITION X(V),0, GET VERTEXDATA POSITION Z(V)
endif
endif
next V
unlock vertexdata
endfunction
A study done by William Speyer, who was a victim of prison rape in 1989, shows that 34% of [prison] rape victims released from prison become child molestors.