NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
April 26, 2018, 10:37:30 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Brevity is the Soul of wit. ..."Shakespeare (154-1616, English dramatist and poet) "
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

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

Posts: 1787


http://weelookang.blogspot.com


WWW
«
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! Grin
 


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

Posts: 3080



WWW
«
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
  Print  
Brevity is the Soul of wit. ..."Shakespeare (154-1616, English dramatist and poet) "
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
is it possible to make applet make a sound when i condition is met?
Questions related to EJS
lookang 8 11132 Last post December 22, 2008, 12:10:01 pm
by lookang
what is the elegant way to make EJS measure a true period of an oscillation?
Questions related to EJS
lookang 2 6902 Last post January 13, 2009, 10:00:43 pm
by lookang
How to make an applet that is controlled by F (length) and angle (cta)
Questions related to EJS
lookang 4 8435 Last post March 02, 2009, 10:22:45 pm
by Fu-Kwun Hwang
Brewster angle
Request for physics Simulations
yanksterh 1 5947 Last post May 16, 2009, 09:44:02 am
by Fu-Kwun Hwang
how to make the angle always acute between two lines?
Questions related to EJS
lookang 2 3611 Last post June 29, 2010, 11:06:13 pm
by Fu-Kwun Hwang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.059 seconds with 23 queries.since 2011/06/15