# Board index » delphi » 3D programming

## 3D programming

I NEED HELP!
PLEASE SEND ME INFORMATION ABOUT 3D PROGRAMMING IN PASCAL, (TURBO PASCAL OR
BORLAND PASCAL).
IF IT'S POSSIBLE, SEND ME A PIECE OF KODE, PLEASE.
THANX U :)

## Re:3D programming

##### Quote
SkyNet (d...@arrakis.es) wrote:

: I NEED HELP!
: PLEASE SEND ME INFORMATION ABOUT 3D PROGRAMMING IN PASCAL, (TURBO PASCAL OR
: BORLAND PASCAL).
: IF IT'S POSSIBLE, SEND ME A PIECE OF KODE, PLEASE.
: THANX U :)

take this, an inefficient conversion from 3d coord to 2d coord

const PV=128;

procedure conv3d2d(x3,y3,z3:integer;var x,y:integer);
begin
if (z<>0) then
begin
{ you may use shift instand of mul}
{ but you have to remember that PV must be an exponent}
{ it's assume only two's power value}
x:=(x3*PV) div z; { x:=(x3 shr PV) ...}
y:=(y3*PV) div z;
end
else
begin
x:=x3;
y:=y3;
end;
end;

I'm too busy to write now it optimized(just now I'm fellow a course
the teacher don't have to discover me , for texture mapping ,rotation
and so on I hear u next time.....

P.S. Look that code is very^OO inefficient & dirty.

bye bye

mailto: dar...@zoo.diaedu.unisa.it
jer...@mbox.starnet.it