Surface command for vector-valued functions

marco_freire shared this question 5 months ago
Needs Answer

Hello,


I have been working with implicit curves defined by functions of the type g: R² -> R³. Unfortunately, the Function command only works for scalar functions.


It is possible to define simple vector functions with the Surface command though: s(a,b) = Surface(f(a,b), a, 0, 0, b, 0, 0) defines a vector function, where f is a linear combination of vectors depending on a and b. It is then possible to compute the value of s at a point (u,v) by simply writing s(u,v). The first screenshot illustrates this use of the command, with all quantities other than a and b being 3d vectors.


When f is more complicated (in my case, when I use UnitVector), the parameters a and b are replaced by their lower bound (as defined by the parameters to Surface), producing a constant value for the surface. This can be seen on the second screenshot.

Is there a way to define a vector function containing commands such as UnitVector, or an easier way to define g: R² -> R³ vector functions?


Thank you for your help.

Best Answer
photo

comand and functions are different concepts and objects

ie: you can not to use unitvector() because it is a comand but you can use (u,v)/abs(u,v) ie: Surface((u, v, u + v + 1) / abs((u, v, u + v + 1)), u, -2, 2, v, -2, 2) because abs() is a function

another example: you can not to use max(f,g), you can use (f+g+abs(f-g))/2 instead

if you need other examples you can search help here

ah! and a,0,0b,0,0 has no sense

Comments (2)

photo
2

comand and functions are different concepts and objects

ie: you can not to use unitvector() because it is a comand but you can use (u,v)/abs(u,v) ie: Surface((u, v, u + v + 1) / abs((u, v, u + v + 1)), u, -2, 2, v, -2, 2) because abs() is a function

another example: you can not to use max(f,g), you can use (f+g+abs(f-g))/2 instead

if you need other examples you can search help here

ah! and a,0,0b,0,0 has no sense

photo
1

Thank you for your reply, I didn't know the distinction between functions and commands, now it works!


As for the a,0,0,b,0,0 part, I only use these surfaces to encode functions, so I don't need a graphical representation of them.

photo
© 2020 International GeoGebra Institute