Improving the feature of track rotation

Suggest changes and improvements to Algodoo.

Improving the feature of track rotation

Postby tatt61880 » Fri Sep 25, 2009 9:33 am

"Track rotation" is nice feature. However, there are some weaknesses in this feature.

Download the scene below and see the weaknesses:


About Scene.Camera.pan:
(1) Scene.Camera.pan is unnatural.
I want object to be sticked to the window. However object moves around the window.

(2) Paning is unnatural.
This weakness might be the same as (1).

About Scene.Camera.rotation:
(3) Scene.Camera.rotation will take zero by pressing "show group" button.Image
So, object rotates by this button.

(4) Cutting the tracked rotation object/objects changes Scene.Camera.rotation.
This is because cutting geometries changes angle into 0.
Image

(5) Brush-tool or CSG will also changes Scene.Camera.rotation.
Same as (4).

About visualizations:
(6) The visualizations are also rotating.
Edit: (6) has been fixed at v1.7.2! Thanks :clap:
Image


About (1):
I've considered this issue.
In addition, I made a system to change Camera.pos correctly by using Thyme. Copy and paste this code to try.
(This script uses laser, so that this requires Algodoo.)
Code: Select all
Scene.my.pos_old = App.mousePos;
Scene.my.pos_current = App.mousePos;
Scene.my.angle = 0.0;
Scene.my.temp = [0, 0] - App.mousePos;

Scene.addBox {
   entityID = 1;
   geomID = 1;
   body = 1;
   size = [1.0, 1.0];
   color = [0.5, 0.5, 0.5, 1.0];
   pos = [0.0, 0.0];
   glued = true;
};
Scene.addBox {
   entityID = 2;
   geomID = 2;
   body = 1;
   size = [0.125, 0.125];
   color = [0.0, 0.0, 0.0, 1.0];
   pos = [-0.0625, 0.0];
   glued = true;
   collideSet = 2;
   refractiveIndex = 1.0;
};
Scene.addHinge {
   geom0 = 1;
   geom0pos = [0.3, 0.3];
   geom1 = 0;
   world1pos = [0.3, 0.3];
   motor = true;
   color = [1.0, 1.0, 1.0, 1.0];
   entityID = 74;
   size = 0.2
};
Scene.addLaserPen { //use Laser for get pos and angle of the object.
   entityID = 3;
   geom = 1;
   size = 0.2;
   color = [1.0, 0.0, 0.0, 1.0];
   relPoint = [0.125, 0.0];
   rotation = 3.1415925;
   collideSet = 2;
   onLaserHit = (e)=>{
      Scene.my.pos_old = Scene.my.pos_current; // P
      Scene.my.pos_current = e.pos; // P'
      Scene.Camera.pan = Scene.Camera.pan + Scene.my.pos_current - Scene.my.pos_old; // O' = O + P' - P
      Scene.my.angle = { // angle of the geometry.
         e.normal(0) == 0 ? {e.normal(1) > 0 ? {math.pi / 2} : {-math.pi / 2}}
         : {e.normal (0) > 0 ? {math.atan(e.normal(1)/e.normal(0))}
         : {math.atan(e.normal(1)/e.normal(0)) + math.pi}
         }
      };
      Scene.Camera.rotation = -Scene.my.angle; //theta
      Scene.my.temp = Scene.Camera.pan - Scene.Camera.pos_current; //P'O'
      Scene.Camera.pan = //O''
      [Scene.my.pos_current(0) + (cos(Scene.Camera.rotation)*Scene.my.temp(0) + sin(Scene.Camera.rotation)*Scene.my.temp(1)),
      Scene.my.pos_current(1) + (-sin(Scene.Camera.rotation)*Scene.my.temp(0) + cos(Scene.Camera.rotation)*Scene.my.temp(1))];
   }
}
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
User avatar
tatt61880
[Most Helpful Person 2010]
 
Posts: 1150
Joined: Mon Aug 31, 2009 5:45 pm
Location: Tokyo, Japan

Re: Improving the feature of track rotation

Postby tatt61880 » Sat Nov 05, 2011 11:10 am

I've uploaded video which shows these issues.
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
User avatar
tatt61880
[Most Helpful Person 2010]
 
Posts: 1150
Joined: Mon Aug 31, 2009 5:45 pm
Location: Tokyo, Japan

Re: Improving the feature of track rotation

Postby tatt61880 » Mon Feb 13, 2012 2:37 pm

Hi.
No feedback from developers?
Is it difficult to implement?
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
User avatar
tatt61880
[Most Helpful Person 2010]
 
Posts: 1150
Joined: Mon Aug 31, 2009 5:45 pm
Location: Tokyo, Japan

Re: Improving the feature of track rotation

Postby tatt61880 » Wed Feb 29, 2012 2:19 pm

Hi, I've created an image to show how to improve "Track rotation".
Please tell me when my explanation is not good to understand.
Image
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
User avatar
tatt61880
[Most Helpful Person 2010]
 
Posts: 1150
Joined: Mon Aug 31, 2009 5:45 pm
Location: Tokyo, Japan


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests