How to make a line with more than two points?

Luis Dessens shared this question 2 months ago

I try to make a function where I make a line with more than two points, the problem is that I do not know what it would be like for a third point to be related to the line.

doing it throug geogebra is something like this

A = (0, 4)

B = (2, -2)

h = (A, B)

C = Point (f) // This is what I do not know how to do it using javascript code

-> (1, 1)

1

Hi,

You may try

ggbApplet.evalCommand("C=Point(f)");

in javascript.

Mathieu

1

maybe you are looking for this:

A= (0,4)

B= (2,2)

h = Line(A, B)

a is a slider or a fix-value and is the x-value of point C

then give as JS-Script onUpdate in object a

ggbApplet.evalCommand("C=(a, h(a))")

.

Note: for me is not clear what is here the added value in JS

you can define C in the algebra-view with C=(a, h(a))

2

pienso que más bien quiere C=midpoint(A,B) pero él no lo sabe

y que luego preguntará por sequence(A+k/n (B-A),k,1,n-1) pero todavía no lo sabe