mkovaxx / ipoly

Manipulate polynomials over an inner product space.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  Copyright 2011 Mate J Kovacs

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.  This file is offered as-is,
  without any warranty.

iPoly manipulates polynomials over an inner product space.

Say, you're solving the equations of ray-sphere intersection.

ray:      H + m*I = P
sphere: (P - C)^2 = r^2

iPoly can collect the coefficients of m's powers.

command:
ipoly "(H + m*I - C)^2 - r^2" -t m

output:
0 -> C^2 - 2*(C*H) + H^2 - r^2
1 -> 2*(H*I) - 2*(C*I)
2 -> I^2

About

Manipulate polynomials over an inner product space.

License:GNU General Public License v3.0


Languages

Language:Haskell 100.0%