Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-21 Thread James Richters
Thanks for the Tip! I had no idea there was a single function that would return both sine and cosine. -Original Message- From: fpc-pascal On Behalf Of Jean SUZINEAU Sent: Friday, September 20, 2019 8:01 PM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Calculating

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-20 Thread Jean SUZINEAU
Tip: if you need Sin(A) and Cos(A), it can be faster to make a single call to SinCos instead of two separated calls to Sin and Cos: https://www.freepascal.org/docs-html/rtl/math/sincos.html It was efficient 20 years ago when I was developing a sky map software, may be the gain is negligible

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-20 Thread Thomas Young via fpc-pascal
lp and suggestions. I also found the websites > and books on the subject very interesting as well. > > James > > > -Original Message- > From: fpc-pascal On Behalf Of > Thomas Young via fpc-pascal > Sent: Tuesday, September 17, 2019 5:00 PM > To: FPC-Pa

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-19 Thread James Richters
on the subject very interesting as well. James -Original Message- From: fpc-pascal On Behalf Of Thomas Young via fpc-pascal Sent: Tuesday, September 17, 2019 5:00 PM To: FPC-Pascal users discussions Cc: Thomas Young Subject: Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-18 Thread Thomas Young via fpc-pascal
This is an isometric projection I use: var H1 = (Y - X) * 0.86602 + ScreenOrgin_H; var V1 = (X + Y) * 0.5 - Z + ScreenOrgin_V; Thomas Young 330-256-7064 Sent from my iPhone > On Sep 17, 2019, at 4:53 PM, Gustavo Enrique Jimenez > wrote: > > A simple transformation is: > > P3D=(X,Y,Z) >

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Tue, 17 Sep 2019, James Richters wrote: > What I'm trying to do is much simpler than rendering a 3D object.. All > I'm trying to do is display a 3D line drawing or wireframe on the > screen. I don't need it to dynamically rotate or anything, and it > doesn't need to show any surfaces,

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-17 Thread Wolf
What you are trying to do is write a very simple CAD program. Have a look at this link , which gives the basic formulae and also Pascal routines to do it. Wolf On 18/09/19 2:10 AM, James Richters wrote: I'm curious if

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-17 Thread Gustavo Enrique Jimenez
A simple transformation is: P3D=(X,Y,Z) P2D=(x,y) x=X+Y*0.707 y=Y*0.707+Z I did not tried it, but I think that this is the transformation that you are looking for. Gustavo El mar., 17 sept. 2019 a las 17:37, James Richters () escribió: > > >What exactly are you trying to do? Usually if

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-17 Thread James Richters
>What exactly are you trying to do? Usually if you’re doing 3D this all happens >on the GPU and you get back a color/depth buffer. Maybe you need to know where >a 2D coordinate is in 3D space? What I'm trying to do is much simpler than rendering a 3D object.. All I'm trying to do is display a

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-17 Thread Ryan Joseph
What exactly are you trying to do? Usually if you’re doing 3D this all happens on the GPU and you get back a color/depth buffer. Maybe you need to know where a 2D coordinate is in 3D space? > On Sep 17, 2019, at 10:10 AM, James Richters > wrote: > > I'm curious if Freepascal has any package

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-17 Thread Graeme Geldenhuys
On 17/09/2019 3:10 pm, James Richters wrote: > I'm not sure what the technical term is for figuring out what pixels > are used to represent 3D coordinates on a 2D screen, but I'm hoping > maybe there is something that just does the calculations that I can > use

Re: [fpc-pascal] Calculating Pixels to represent 3D coordinates

2019-09-17 Thread Sven Barth via fpc-pascal
James Richters schrieb am Di., 17. Sep. 2019, 16:15: > I'm curious if Freepascal has any package available that would calculate > X,Y screen pixels based on 3D X,Y,Z data at some given rotations. I'm > using Agg-Pas with PTC-Graph in a console application on Windows. I'm not > sure what the