Multiplying Parameters of SetCoords Command by a Constant

eugbug shared this question 1 week ago
Answered

I'm multiplying by a sin factor but it doesn't work. I tried simplifying the equation and just used "x 2" as a multiplier and I still got an error. (The script works out opposite and adjacent sides of a right-angled triangle).

SetCoords(E,0,(Distance(E,H) x sin(PlaneAngle) x (-1)), ( z(H) - Distance(E,H) x cos(PlaneAngle)))


E and H are points and PlaneAngle is a number.


SetCoords works in the 2D graph window even for non-free objects. The point just moves on the path to a point which has the shortest distance to the coords provided in the SetCoords command. The Wiki however says that it's only for free objects. (but are points on circles classed as free?) My problem is just a syntax one though I think.

Link attached.


https://www.geogebra.org/cl...

Comments (2)

photo
2

You can't use the letter "x" as multiply. Instead of

(Distance(E,H) x sin(PlaneAngle) x (-1))
try

(Distance(E,H) sin(PlaneAngle) (-1))

© 2019 International GeoGebra Institute