gama.old icon indicating copy to clipboard operation
gama.old copied to clipboard

Combination of rotate: and size: in 'draw' produce wrong rotations for spheres and cylinders

Open AlexisDrogoul opened this issue 7 years ago • 5 comments

Describe the bug When using rotate with any value (an angle or an angle + the axis), spheres and cylinders rotate around some axis, but not their own center.

To Reproduce Steps to reproduce the behavior:

  1. Build a simple model with a draw statement like this one:
     draw sphere(10) rotate: 15;
  1. Run it.
  2. The sphere rotates about an axis which is difficult to determine, but which is not its center

Expected behavior Spheres and cylinders should rotate like cubes or pyramid, around their own center of gravity

Desktop (please complete the following information):

  • OS: macOS High Sierra
  • GAMA version: git
  • Java version 1.8

AlexisDrogoul avatar Jul 30 '18 17:07 AlexisDrogoul

Difficult to understand exactly what happens. Even with a fixed position it shows up...

AlexisDrogoul avatar Aug 01 '18 04:08 AlexisDrogoul

Well, actually my example is misleading. The combination that produces this error is

draw sphere(10) size: 10 rotate: 15;

It is the combination of the rotation and the scaling (via size:) that produces this effect. As if one of the translations to make (back and forth) during scaling was not done. Without size: everything is normal.

AlexisDrogoul avatar Aug 01 '18 04:08 AlexisDrogoul

Closing and moving this thread to #2209, in the long list of OpenGL rendering issues to fix...

AlexisDrogoul avatar Aug 06 '18 08:08 AlexisDrogoul

I also notify a "weird" behavior using rotate and size at the same time with some specific angle (hard to knwo exactly which one) the size of the obj_file is smaller

Can be tested in Moving 3D Object.gaml

agrignard avatar May 08 '19 18:05 agrignard

Reopening this issue for the next round of development on GAMA 2.0

AlexisDrogoul avatar Feb 20 '22 03:02 AlexisDrogoul