estimating an area

Blitz3D Forums/Blitz3D Programming/estimating an area

I need to estimate the area of an object facing the camera.

This is what I've come up with so far.

frontarea#=50.0
Toparea#=50.0
sidearea#=50.0
totalarea#=0.0

yaw#=45.0
pitch#=0.0
roll#=0.0

totalarea#=Abs(Sin(yaw#)*sidearea#)+Abs(Cos(yaw#)*(Abs(Sin(pitch#)*toparea#)+Abs(Cos(pitch#)*frontarea#)))

Print "Total: "+totalarea#

WaitKey()


It seems to work(although I haven't done much testing), but is there an easier or faster way of doing it?

Any input would be very welcome!

Andy