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

what about x,y,z in Output?

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

Comments (5)

photo
1

Try entering this in "Keep Input" mode:

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

photo
1

Ahhh,

very usefull, Thank you very much!


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


Same problem (dispatcher prop?)...

I want add my Sig

---

Please remove unnesseary brackets in output-copy

photo
1

Mist,

the game is not over - new problem

Function does not compute correct...

https://www.geogebra.org/m/X72x6VFP

Line 7 Functiondef

Line 9 fitting function results to matrix

Line 10 result expected

90506dbf6527b7cca2e401f0d3b8891a

---

Please remove unnesseary brackets in output-copy

photo
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!

photo
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

© 2023 International GeoGebra Institute