spin the cube

ZXNet echo conference «code.zx»

From Costa Pilnik To All 11 April 2004

hi All! Here the couple is obsessed with the subject’s algorithm. who can tell me what? So the problem is like this, we have a point (x0,y0) - the center of the cube L - edge length angle of rotation (in radians) x` y` z` how to protect the corner points of a cube (x5,y5) (x6,y6) +---+ /| /| (x1,y1)+-|-+(x2,y2) | | | | (x7,y7)+-|-+(x8,y8) |/ |/ +---+ (x3,y3) (x4,y4) with less losses? What's the best way to implement it? What are your thoughts on this matter, gentlemen? or Are there any coders left here? Bay W.B.R. rNd [Team: X-Tension] [FREE] [BSB] [GMD]

From Alexander Bondarenko To Costa Pilnik 15 April 2004

*Hello, Random!* Catch my ideas about the subject “twist the cube”, which I talked about on Apr 11 2004 your footcloth to comrade. All. CP> here’s a couple poring over the subject’s algorithm. CP> who can tell me what? [smashed] CP> (x5,y5) (x6,y6) CP> +---+ CP> /| /| CP> (x1,y1)+-|-+(x2,y2) CP> | | | | CP> (x7,y7)+-|-+(x8,y8) CP> |/ |/ CP> +---+ CP> (x3,y3) (x4,y4) CP> with less losses? CP> what is the best way to implement it? What are your thoughts on this matter, gentlemen? or CP> are there any coders left here? Have you decided to stir this up on Spec? /That’s all, Random, you can scroll further.../

From Costa Pilnik To Alexander Bondarenko 16 April 2004

hi Alexander! I am responding to your letter dated April 15, 2004, then written by Alexander Bondarenko to Costa Pilnik, and then it was 16:47:03. AB> *Hello, Random!* AB> Catch my ideas about the subject “Twirl the cube”, which I was talking about in AB> 11 Apr 2004 your foot wrap to comrade. All. CP>> here’s a couple poring over the subject’s algorithm. CP>> who can tell me what? AB> [smashed] CP>> (x5,y5) (x6,y6) CP>> +-+-+ CP>> /| /| CP>> (x1,y1)+-|-+(x2,y2) CP>> | | | | CP>> (x7,y7)+-|-+(x8,y8) CP>> |/ |/ CP>> +-+-+ CP>> (x3,y3) (x4,y4) CP>> with less losses? CP>> what is the best way to implement it? What are your thoughts on this matter, gentlemen? or CP>> are there any coders left here? AB> Have you decided to stir this up on Speck? on Amiga, on C in general. Bay W.B.R. rNd [Team: X-Tension] [FREE] [BSB] [GMD]

From Costa Pilnik To Alexander Bondarenko 17 April 2004

hi Alexander! I am responding to your letter dated April 15, 2004, then written by Alexander Bondarenko to Costa Pilnik, and then it was 16:47:03. CP>> (x5,y5) (x6,y6) CP>> +-+-+ CP>> /| /| CP>> (x1,y1)+-|-+(x2,y2) CP>> | | | | CP>> (x7,y7)+-|-+(x8,y8) CP>> |/ |/ CP>> +-+-+ CP>> (x3,y3) (x4,y4) CP>> with less losses? CP>> what is the best way to implement it? What are your thoughts on this matter, gentlemen? or CP>> are there any coders left here? AB> Have you decided to stir this up on Speck? piled on while rotating in X and Y (increment of sinyc-cosine-length of edge to coordinates respectively) I can’t figure out how to hide Z. :( But how is 3D projected onto 2D in general? It seems like the root needs to be counted there? eh, there was a good subject in tech, stereometry... Bay W.B.R. rNd [Team: X-Tension] [FREE] [BSB] [GMD]

From Aleksey Malov To Costa Pilnik 17 April 2004

Hi Costa! Sunday April 11 2004 at 02:47 Costa Pilnik wrote to All about twirl the cube CP> here’s a couple poring over the subject’s algorithm. CP> who can tell me what? First, get familiar with the theory. I advise you to read a textbook on linear algebra. About matrices and all that. Then you will learn to twirl not only cubes, but also anything more complicated. True, on the Spectrum, matrix operations in all their glory are really no one does not use. At least in demes. Because of the speed. That's how it is on the Spectrum it turns out that due to the lack of operations in the Z80 processor command system multiplication (at least integer), it’s faster to use it in advance calculated tables of sines of various amplitudes and limit ourselves to rotations around two or three coordinate axes. Bye, Costa! Vivid/Brainwave Team http://www.bwteam.org ICQ: 164514413

From Costa Pilnik To Aleksey Malov 21 April 2004

hi Alexey! I am responding to your letter dated April 17, 2004, then written by Aleksey Malov to Costa Pilnik, and then it was 3:01:14. AM> Hi, Costa! CP>> here’s a couple poring over the subject’s algorithm. CP>> who can tell me what? AM> First, familiarize yourself with the theory. I advise you to read a textbook on linear AM> algebra. About matrices and all that. Then you will learn to twirl not only eh, where can I get it? Maybe you’re throwing out information like soap, unless of course you have it? Bay W.B.R. rNd [Team: X-Tension] [FREE] [BSB] [GMD]

From Aleksey Malov To Costa Pilnik 23 April 2004

Hi Costa! Saturday April 17 2004 at 00:38 Costa Pilnik wrote to Alexander Bondarenko about twirl the cube CP> piled on the rotation in X and Y (increment of sinyc-cosine-length of edge CP> to the coordinates, respectively) I can’t figure out how to hide Z. :( CP> but how is 3D projected onto 2D? It seems like the root needs to be counted there? CP> eh, a good subject was in engineering, stereometry... Read smart books. Everything is written there. For example, "mathematical foundations machine graphics". In general, in your case, the simplest method of projection would be (the roots are not needed): x2d = x3d*scale/z3d y3d = y3d*scale/z3d here scale is a certain coefficient (you can take half the screen width). In general, you need to use matrices. At university this is taught in the first year. If you have the Internet, then go to gamedev.ru. In general, it’s not serious to rotate cubes in those days when even on the Spectrum implemented textured 3d. Bye, Costa! Vivid/Brainwave Team http://www.bwteam.org ICQ: 164514413

From Costa Pilnik To Aleksey Malov 13 May 2004

hi Alexey! I am responding to your letter dated April 23, 2004, then written by Aleksey Malov to Costa Pilnik, and then it was 22:13:22. AM> In general, in your case, the simplest method of projection would be (roots AM> not needed): AM> x2d = x3d*scale/z3d AM> y3d = y3d*scale/z3d AM> here scale is a certain coefficient (you can take half the screen width). Actually, what is x3d? ,a z3d? Can you go into more detail, so to speak, just for the sake of it, otherwise it’s not clear. ;) look, there is a center (x,y) there are 3 values, x`,y`.z` angles of rotation (0-360), can be in radians, not The main thing is the length of the edge, it is known that this is a cube, that is, the edges are equal;) and each point in 3D view (that is, not projected into 2D) is equidistant from center how to find the vertices of a cube projected into 2D (that is, coordinates of the form (x,y))? AM> In general, you need to use matrices. At the university you study this in the first course. so matrices are not our method (the matrix, IMHO, gives distortion), for me the algorithm itself is interesting projections, without having a current point-center and length of edge, and specifically the cube, I'm tormented by the idea of shaking up the universal 3D engine... AM> If you have Internet, then go to gamedev.ru. I'll take a look ;) AM> In general, it’s not serious to rotate cubes in those times when even AM> textured 3d was implemented in the spectrum. again, matrices, okay, sometimes on the internet... Bay W.B.R. rNd [Team: X-Tension] [FREE] [BSB] [GMD]

From Aleksey Malov To Costa Pilnik 13 May 2004

Hi Costa! Thursday May 13 2004 at 01:19 Costa Pilnik wrote to Aleksey Malov about cube twirl AM>> x2d = x3d*scale/z3d AM>> y3d = y3d*scale/z3d ^^^ Meaning y2d AM>> here scale is a certain coefficient (you can take half the width AM>> screen). CP> actually, what is x3d? , a z3d? Coordinates of a point in three-dimensional space. Imagine that the observer's eye (the center of the screen) is located at the coordinates (0,0,0). it looks in the positive direction of the z axis. The Y axis of the screen coincides with the Y axis of the coordinate system. CP> 3D view (that is, not projected into 2D), equidistant CP> from the center. how to find the vertices of a cube projected into 2D (that is CP> coordinates of the form (x,y))? First, rotate all the vertices of the cube to the angle you need. Then converted run the vertices through the perspective transformation formulas. (before this, sweep away cube along the z axis (so that it is in front of the camera). CP> the center point and the length of the edge, and it is the cube, the idea torments me, CP> shake up the universal 3D engine ... Damn. It makes no difference which object you rotate! The formulas are elementary.Use matrices - this is a universal tool invented by mathematicians for in order to store coordinate transformations in a convenient form. Everything else - pure sotonism, which creates confusion and limits possibilities programs. Bye, Costa! Vivid/Brainwave Team http://www.bwteam.org ICQ: 164514413