NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
April 01, 2020, 12:13:40 am

Simplicity is the ultimate sophistication. ..."da Vinci (1452-1519, Italian artist, sculptor, painter, architect, engineer and scientist) "

 Pages: [1]   Go Down
 Author Topic: How to make for Trail to connected true for angle 0 to 360 but not jump 360-0?  (Read 4955 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Hero Member

Offline

Posts: 1794

http://weelookang.blogspot.com

 « Embed this message on: December 11, 2009, 03:18:51 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

How to make for Trail to connected true for angle 0 to 360 but not jump 360-0?

Hi Ejs Professional learning community,

i want to make the graph points connected from 0 to 360 only, the jump from 360 to 0 shows a "undesired" line back to 0.

the variable ctadegree0360 has values from 0 to 359.9 and will increase to 360 which becomes 0.

i can't use the trick "_isPlaying" because it didn't pause
i also can't use the trick "ctadegree0360 <= 360" because depending on the speed of rotation, by the point 350 the next point could have jump to 5 degree.

any tips? Thanks!

 undesiredline.PNG (16.54 KB, 983x345 - viewed 504 times.) « Last Edit: December 11, 2009, 03:41:54 pm by lookang » Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #1 on: December 11, 2009, 04:07:04 pm » posted from:Taipei,T'ai-pei,Taiwan

The value for angle, e.g. cta, should be increasing from 0...350, ... 360, 361...
Why the value jump back to zero? You must have added some code to make the change.
Add a variable for "connection" property for trace, and add code to change it's value from true to false when you do not want connected line.
 Logged
 Pages: [1]   Go Up
Simplicity is the ultimate sophistication. ..."da Vinci (1452-1519, Italian artist, sculptor, painter, architect, engineer and scientist) "