# CAS Function

hawe shared this problem 5 years ago
In Progress

B Point, f Line

Want to calculate Reflect(B, f) in CAS with function vector eo, vector no

1. s(eo,no):=eo - (2/sqrt(no^2)*Dot(eo,no) )* no/sqrt(no^2)
2. >s(eo, no):=((2 * no) * ((((x * eo) * x) * no) + (((y * eo) * y) * no) + (((z * eo) * z) * no)) / no^(2)) + eo

s(eo, no):=(((-2) * no) * ((((x * eo) * x) * no) + (((y * eo) * y) * no) + (((z * eo) * z) * no)) / no^(2)) + eo

It is possible to handle vectors/lists in functions?

Please remove unnesseary brackets in output-copy

hawe 1

Try entering this in "Keep Input" mode:

1. s(eo,no):=eo - (2/sqrt(no^2)*Dot(eo,no) )* no/sqrt(no^2) 1

Ahhh,

very usefull, Thank you very much!

this solves https://help.geogebra.org/t...# , too!

Same problem (dispatcher prop?)...

---

Please remove unnesseary brackets in output-copy 1

Mist,

the game is not over - new problem

Function does not compute correct...

Line 7 Functiondef

Line 9 fitting function results to matrix

Line 10 result expected ---

Please remove unnesseary brackets in output-copy 2

Strange, it seems to be swapping the arguments of s() over, try

1. Append(Append({Flatten(s(n,e1))},Flatten(s(n,e1))),Flatten(s(n,e3)))

We'll check! 1

hm,

swap arguments

s(no,vo):=vo - 2 Dot(vo, no)/Dot(no, no)*no

Append(Append({Flatten(s(n,e1))},Flatten(s(n,e2))),Flatten(s(n,e3)))

cool - does correct calculation

but should run otherway too?

hawe