Get[FileNameJoin[{NotebookDirectory[],"Packages","ConformalAlgebra3D.wl"}]]

p:=px e[1,5]+py e[2,5]+pz e[3,5]+pw e[4,5]

l:=lvx e[4,1,5]+lvy e[4,2,5]+lvz e[4,3,5]+lmx e[2,3,5]+lmy e[3,1,5]+lmz e[1,2,5]

g:=gx e[4,2,3,5]+gy e[4,3,1,5]+gz e[4,1,2,5]+gw e[3,2,1,5]

a:=ax e[1]+ay e[2]+az e[3]+aw e[4]+au e[5]

d:=dvx e[4,1]+dvy e[4,2]+dvz e[4,3]+dmx e[2,3]+dmy e[3,1]+dmz e[1,2]+dpx e[1,5]+dpy e[2,5]+dpz e[3,5]+dpw e[4,5]

c:=cgx e[4,2,3]+cgy e[4,3,1]+cgz e[4,1,2]+cgw e[3,2,1]+cvx e[4,1,5]+cvy e[4,2,5]+cvz e[4,3,5]+cmx e[2,3,5]+cmy e[3,1,5]+cmz e[1,2,5]

s:=su e[1,2,3,4]+sx e[4,2,3,5]+sy e[4,3,1,5]+sz e[4,1,2,5]+sw e[3,2,1,5]

Reflection

Simplify[-g\[Antigeometric]a\[Antigeometric]Rev[g],{gx^2+gy^2+gz^2==1}]//BasisForm

Simplify[-g\[Antigeometric]p\[Antigeometric]Rev[g],{gx^2+gy^2+gz^2==1}]//BasisForm

-OperatorMatrix[g,{gx^2+gy^2+gz^2==1}]//MatrixForm

Translation

translation:=tx/2 e[2,3,5]+ty/2 e[3,1,5]+tz/2 e[1,2,5]+e[1,2,3,4,5]

translation\[Antigeometric]p\[Antigeometric]Rev[translation]//BasisForm

OperatorMatrix[translation]//MatrixForm

Dual[translation]//BasisForm

Dual[translation]\[Geometric]p\[Geometric]Rev[Dual[translation]]//BasisForm

Dilation

dilation:=(1-σ)/2(mx e[2,3,5]+my e[3,1,5]+mz e[1,2,5]-e[3,2,1])+(1+σ)/2e[1,2,3,4,5]

Simplify[dilation\[Antigeometric]p\[Antigeometric]Rev[dilation]]//BasisForm

Simplify[OperatorMatrix[dilation]]//MatrixForm

Quaternion Rotation

quaternion:=(vx e[4,1,5]+vy e[4,2,5]+vz e[4,3,5])Sin[ϕ/2]+e[1,2,3,4,5]Cos[ϕ/2]

Simplify[quaternion\[Antigeometric]p\[Antigeometric]Rev[quaternion],{vx^2+vy^2+vz^2==1}]//BasisForm

Simplify[OperatorMatrix[quaternion,{vx^2+vy^2+vz^2==1}]]//MatrixForm

Antidual[quaternion]//BasisForm

Simplify[Antidual[quaternion]\[Geometric]p\[Geometric]Rev[Antidual[quaternion]],{vx^2+vy^2+vz^2==1}]//BasisForm

Line Rotation

R:=l Sin[ϕ/2]+e[1,2,3,4,5]Cos[ϕ/2]

Simplify[R\[Antigeometric]p\[Antigeometric]Rev[R],{lvx^2+lvy^2+lvz^2==1}]//BasisForm

OperatorMatrix[R,{lvx^2+lvy^2+lvz^2==1}]//MatrixForm

General Screw

Q[l,ϕ,δ]:=l Sin[ϕ/2]+e[1,2,3,4,5]Cos[ϕ/2]-(Antidual[l]∧e[5])δ/2 Cos[ϕ/2]-δ/2 Sin[ϕ/2]e[5]

Q[l,ϕ,δ]//BasisForm

License

MIT License

Copyright (c) 2025 Eric Lengyel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.