I have a 2Dshape and I want to rotate it by a variable angle, say "theta", which I have already declared in the variables panel.
So I try to input my variable to the dialog box that accompanies the cell "Transform". I type "theta", in the cell next to the button "Rotation" and press the button. The line on the bottom reads "ro:thetad" which seems to me wrong syntax and it appears that it actually is, because in the output area reads
"Incorrect value for transformation: ro:thetad java.lang.NumberFormatException:For input string:"theta" at.sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1242) .... ..." many more lines, you get the idea
and of course it's not rotating when I run the simulation.
I can't figure out what's wrong with the syntax, as my programming skills are below average and I have little knowledge of java .
I am making a simulation on EJS, but I am having problem with my custom code. I don't undestand how I can get the Object of a button or a 2dShape I make so I can use the class functions with it.
For example, I have created a 2Dshape. I want to be able to change its color when I click on it, by using the function "setColor()" of the class.. I cant seem to get the object of the 2DShape. I used the functions "_view.getvisual("shape")" to no avail. I don't have so much knowledge in programming.