Browse Search Popular Register Upload Rules User list Login:
Search:
Rotate Polygon

Image:
screenshot of the scene

Author: s_noonan

Group: Technical

Filesize: 415.84 kB

Date added: 2019-01-12

Rating: 5

Downloads: 674

Views: 225

Comments: 15

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

I was also trying to figure out how to make a tool similar to this but have the X and Y sliders shear (skew) the object and image. Skewing the object is no problem, but I can't figure out how to make the image match the object. If you happen to figure it out, then either post the solution in comments below or make a response scene. Feel free to modify this scene to XY skew instead of XY rotate and post it as a response to this scene.
Last edited at 2019/02/16 14:09:35 by s_noonan
Please log in to rate this scene
edit
Similar scenes
Title: cyclogon 1
Rating: 5
Filesize: 15.06 kB
Downloads: 435
Comments: 0
Ratings: 1
Date added: 2017/07/27 10:08:40
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: cyclogon 2
Rating: 5
Filesize: 17.64 kB
Downloads: 389
Comments: 0
Ratings: 1
Date added: 2017/07/27 10:12:09
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: cyclogon 3
Rating: 5
Filesize: 14.1 kB
Downloads: 336
Comments: 0
Ratings: 1
Date added: 2017/07/27 10:14:36
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Polygons
Rating: 6.25
Filesize: 5.13 kB
Downloads: 200
Comments: 1
Ratings: 4
Date added: 2008/07/13 12:47:17
Made with: Phun
Rating: rated 6.3
download
Title: 360X360 3D ROTATE FULL
Rating: 5
Filesize: 17.23 kB
Downloads: 309
Comments: 1
Ratings: 1
Date added: 2010/09/26 14:45:24
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Title: Polygon Clones
Rating: 5
Filesize: 49.47 kB
Downloads: 750
Comments: 1
Ratings: 1
Date added: 2009/09/05 17:27:01
Made with: Phun
Rating: rated 5
download
How do you skew images?
s_noonan -- Is "skew" the same as "translate"?


EDIT: Never mind. I found this which explains it fairly well: Skew Lines
Last edited at 2019/01/12 18:17:23 by Xray
Q: How do you skew images?
A: Set textureMatrix = [tm0, mod2SkewX, tm2, mod2SkewY, tm4, tm5, 0tm6, tm7, tm8]
s_noonan said: "Skewing the object is no problem, but I can't figure out how to make the image match the object."

Would you be willing to complete this scene which includes "Skewing"? I would like to play with it to see if I can make the image match the object. If you don't want to make the temporary scene public, just do what you did before, that is, upload the scene and then immediately delete it. You don't need to provide a link to it because I can find it through your username. Just let me know when it is ready for me to download it. If by some miracle I figure it out, I'll send you the instructions of how I did it so that you can post the scene in your name. What say?
Done.
s_noonan -

1. Is the Skew This scene supposed to work properly with polygons as well as with boxes and circles? I ask this because the scene doesn't seem to handle rotating polygons properly. That is, the object's texture does not rotate in coordination with the object's body.

2. When I use the Skew sliders, the new image on the right side is doing something, but I'm not so sure that it's "skewing". Isn't the original image supposed to also skew along with the copied image, but in different planes? Before I go much further and possibly waste a lot of time, could you please clear this up for me? Please explain in detail exactly how the object and its image is supposed to move relative to each other.

3. Are you continuing to work on this scene to try to complete it and make it work correctly? If you are, then please let me know when you have a properly working scene so that I don't need to continue working on it.

Thanks!
Q: Is the Skew scene supposed to work properly with polygons as well as with boxes and circles?
A: No, just polygons.

S: The scene doesn't seem to handle rotating polygons properly.
R: It does handle rotating polygons properly when the skew sliders (X' and Y') are both set to 0.0.

Q: Isn't the original image supposed to also skew along with the copied image, but in different planes?
A: No, the original image is unchanged.

S: Please explain in detail exactly how the object and its image is supposed to move relative to each other.
R: The original object with its texture are on the left and remain unchanged. The created object is on the right and its texture should fit the object like a glove.

Q: Are you continuing to work on this scene to try to complete it and make it work correctly?
A: No, I gave up on it for a while. I may try again in a couple of weeks or never.

In the skew scene, if you start with [X,Y,Z,X',Y'] = [90,90,0,0,0] and vary just X, Y, and Z, then the scene should work the same as the "Rotate Polygon" scene on the page.

In the skew scene, if you start with [X,Y,Z,X',Y'] = [90,90,0,0,0] and vary just X', or vary just Y', then the skews should work OK. Changing both X' and Y' at the same time screws things up. Changing anything other than (1) skew adjustment by itself will mess up the skew.

I uploaded a new scene with [X,Y,Z,X',Y'] = [90,90,0,0,0] to give an exact starting point.
Thanks! This new information will help a great deal.

BTW - I don't like how you did the sliders (no offense) because they must be clicked on at least one time before the mouse can control them. It's due to the fact that onClick activates on "mouse button up". I made a change which fixes that. Now you can control them the first time you click the mouse button down on them.
Did you just delete the "scene.my.focusID == _parentID ? {}:{}" condition? Do you know of a better way to do it?
Last edited at 2019/01/16 07:53:52 by s_noonan
I used my "_proximity" routine which returns true whenever the mouse cursor is over a button or other geometry. I AND it with keys.isDown("mouse_left"), and that is what I use to trigger a click on the object. I do not use "onClick" at all. You can see the actual code in many of my scenes which have buttons to click on.
s_noonan - I'm going to have to concede defeat on trying to fix your skew code. I realized many years ago that when you take on the task of debugging or otherwise maintaining OPC (Other People's Code) it often turns out to be a losing battle, especially if the code is complex, and/or if the original programmer used unconventional coding techniques. In my particular case, it's even worse than those situations because I would have to include the fact that I am not the programmer that I once was back in the 1980's and early 1990's when I was programming embedded single-board computers as a professional. The brain isn't quite as sharp as it was back then. :blush:

BTW - I compared my "_proximity" button handler with simply deleting your "scene.my.focusID == _parentID ? {}:{}" and it turns out that your fix works just about the same as mine does, but yours is a lot simpler. So, I suggest that you use that as the fix for the onClick issue.

Thanks.
I see it more as a problem of understanding how textureMatrix transformations track polygon transformations. Kilinich mentions that this should help, but I still couldn't figure it out. It seems fine for explaining polygon transformations, but does not explain the relationship between the polygon and the texture.
"I see it more as a problem of understanding how textureMatrix transformations track polygon transformations." You're right about that!
Can I use the code for this, if I can where can I find the code?
Q: Can I use the code for this?
A: Yes.

Q: where can I find the code.
A: In the blue "Rotate Polygon" box._rotatePoly.