Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: What is the best approach to visualize the ganja.js examples? #76

Open
maxfreu opened this issue Aug 27, 2020 · 1 comment
Open
Labels

Comments

@maxfreu
Copy link

maxfreu commented Aug 27, 2020

Hi! I'm trying to implement the 2D projective geometric algebra examples from ganja. Implementing the cheat sheet and translating the code seems not to hard, but I do not yet understand I should create an interface between Grassmann and the julia plotting ecosystem. So maybe the question is a bit broad, but how can I translate e.g. a point or line (Chain or Multivector) into an "ordinary" 2D point or line which I can plot with Plots/Makie etc.? I saw your nice plots of vectorfields, so it is obviously possible - but maybe you can give or point me to some more examples. :)

Edit: I'm using @basis "0,1,1" as basis for 2D PGA, which is hopefully correct. (?)

@chakravala
Copy link
Owner

chakravala commented Aug 27, 2020

For traditional plotting I prefer to use Makie.jl package, which has interoperability with Grassmann.

There is also a proof of concept available allowing the usage of ganja.js together with Grassmann in Ganja.jl

Last but not least, there is an experimental Ajna.jl which allows simple 2D geometric algebra visualization.

julia> using Grassmann, Ajna

julia> basis"0,1,1" # first coordinate is used as origin
(⟨0,1,1⟩, v, v₁, v₂, v₃, v₁₂, v₁₃, v₂₃, v₁₂₃)

julia> Ajna.raster([(v1+v2)(v1+v3)])
100×100 Array{GrayA{Float64},2} with eltype ColorTypes.GrayA{Float64}:
...

There are many visualization options possible, so I would appreciate any examples or feedback you come up with yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants