linedisp

command module
v0.0.0-...-b1195e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

README

linedisp

Using coordinate matrices and linear algebra, we can project a 3D model on screen. A linear map using rotation and scale matrices allows support for both rotation and zoom. The lines are drawn entirely using the regular canvas.Line objects in Fyne.

matrix-display.webm

How it works

Multiple points are added together to form a coordinate matrix. We then tell Fyne to draw lines between all of the positions within the columns of the coordinate matrix. We can then simply use matrix transformations to modify the coordinate matrix and thus also the view on screen.

For rotation with the mouse, it uses two threedimensional rotation matricies, those for X and Y rotation, multiplied together to a single matrix. This allows the view to be roteted only by multiplying one coordinate matrix (instead of two times) and then telling Fyne to re-draw it.

For scaling with the scroll whell, it uses a scaling matrix to make the view larger or smaller on the screen. Again, it is as simple as multiplying the the coordinate matrix and telling Fyne to re-draw it.

Built using

This project is built using the following projects:

License

Linedisp is licensed under the BSD 3-Clause License and freely avaliable to all of those that wish to use it.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL