POV-Ray : Newsgroups : povray.advanced-users : How to model a cube in 2D? : Re: How to model a cube in 2D? Server Time
29 Jul 2024 20:24:50 EDT (-0400)
  Re: How to model a cube in 2D?  
From: Rune
Date: 24 Jan 2001 12:49:03
Message: <3a6f158f@news.povray.org>
"Peter Popov" wrote:
> I still don't have a clue how to proceed once I have the
> screen coordinates of the vertices. I have to start with
> a square and scale, rotate & tilt it to its deformed shape.
> It is possible since a cube face in orthographic projection
> will always be a parallelogram, but how?

Well, you could start with finding the width and height of the
input-face-parallelogram, and scale the output-face so it has the same
proportions. The you can find the angle of one of the corners in the
input-face and tilt the output-face so it has the same angle in the corner.
Then find out how much you must rotate the output-face to match the
input-face. Finally translate it if that's necessary.

Hope that helps. If you need more details, I'll need more details first...
:)

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.