Ask Your Question
1

Sage for computer graphics?

asked 2012-10-05 03:59:15 +0200

Maxxi gravatar image

updated 2012-10-05 04:15:13 +0200

Hi, I want to use Sage for visualizing curves, possibly 3d collision=intersection surfaces.. stuff like that. Is it suitable for that at all? For example, sage matrices sometimes require me to specify a "ring", I looked it up on wikipedia but there is no mention of the denotations "QQ" and "ZZ" that sage apparently uses. Can you help me understand these or point me to the right docs?

I will also need to do calculations with complex numbers and quaternions but I haven't found a library in sage that would do that. I'll give you a really practical example that I'm actually trying to do right now and this is the sort of thing that I want to do all the time: I have two quaternions, first I want to visualize them in 3d space. Then I want to draw a curve visualizing the function to interpolate between those two quaternions. For example, I want to see visually what spherical linear interpolation looks like in 3D, just like here: Slerp on Wikipedia

Any pointers you can give me? Thank you in advance.

(can sage switch between column-major / row-major?)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-10-05 07:27:57 +0200

Volker Braun gravatar image

A ring is a set with multiplication and addition, for example QQ = rational numbers and ZZ = integers.

You can construct quaternions as follows:

sage: i,j,k = QuaternionAlgebra(1,1).gens()
sage: j*k
-i
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-05 03:59:15 +0200

Seen: 591 times

Last updated: Oct 05 '12