I would just cheat:
box 10,10,54,54 : get image 1,0,0,64,64
sync on : sync rate 0 : autocam off
rad#=1
make object sphere 1,rad#*2.0 : texture object 1,1 : scale object texture 1,8,8
make object sphere 2,0.2 : color object 2,rgb(255,0,0)
position camera 0,0,-3
do
` move sphere around randomly
f#=wrapvalue(f#+0.5)
turn object right 1,0.4+(0.5*sin(f#))
pitch object up 1,0.5+0.5*cos(f#)
` position dummy object, rotate it to same angles as sphere and move it forward to edge
position object 2,object position x(1),object position y(1),object position z(1)
set object to object orientation 2,1
move object 2,rad#
` show values
set cursor 0,0
print "X=";object position x(2)
print "Y=";object position y(2)
print "Z=";object position z(2)
sync
loop
If your mansion house needs haunting, just call Rentaghost!