Tuesday, October 04, 2005

Word name completion in listener, and quaternions

I added completion popups to the listener. Keyboard selection of possibilities has not been implemented yet. You have to use the mouse.



I also added support for quaternions to Factor's math library. Quaternions are useful for certain geometrical calculations; a 3-dimensional rotation around an axis can be represented as multiplication by a quaternion.

Quaternions are represented as pairs of real numbers. Literal syntax is Q{ a b c d }Q, where a, b, c and d are real numbers.

Many quaternion operations can be done using Factor's existing vector algebra words; this follows from the mathematical fact that the quaternions are a 2-dimensional vector space over the complex numbers:

Addition: v+
Subtraction: v-
Negation: vneg
Norm: norm
Multiplication by a complex number on the left: n*v

A few new words are also needed:

Convert complex number to quaternion: c>n
Multiply by a complex number on the right: q*n
Quaternion multiplication: q*
Quaternion division: q/
Quaternion conjugate: qconjugate

1 comment:

Anonymous said...

Hi, this is off topic but your email address bounced so I found you here.

I was hoping to ask a quick question about your jEdit FTP plugin- namely in what format does the plugin expect the private key when connecting to an SFTP server?

I use a 1024-bit SSH-2 RSA key, as generated by puttygen as a .ppk file, and get the following error - Invalid Private Key File "The key format is not a supported format."

I’m running:
FTP plugin v0.7.3
jEdit v4.2
Java 2 v1.4.2_03
PuTTYgen 0.58
Windows XP Pro SP2

Any advice much appreciated. Many thanks for the plugin :)

cheers, Dave