Skip to content

danieledapo/termesh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Termesh

Explore 3D meshes in your terminal! If you want to know more take a look at this blog post.

teapot1teapot2teapot3

Usage

$ cargo run --release -- --help
$ cargo run --release -- data/teapot.stl
$ cargo run --release -- data/teapot.stl --wireframe --non-interactive --rotation-x 0.8 --scale 40 --no-depth
$ cargo run --release -- data/demo.tmesh

DSL

termesh has a custom DSL that can be used to draw 3D objects without going through the process of building and exporting the mesh in a separate sofware. A DSL is also useful because it plays well with version control. Here's an example of what the DSL is currently capable of.

# define vertices
vertex v1 =  0    0    0
vertex v2 =  0.5  0.5  0.5
vertex v3 = -0.5 -0.5 -0.5

# draw lines
line v1 v2

# draw triangles
triangle v1 v2 v3

Keybindings

q: Quit
s: Save current frame to file
d: Toggle depth rendering
w: Toggle rendering only wireframe
x: Rotate on the X axis counterclockwise
X: Rotate on the X axis clockwise
y: Rotate on the Y axis counterclockwise
Y: Rotate on the Y axis clockwise
z: Rotate on the Z axis counterclockwise
Z: Rotate on the Z axis clockwise

About

display 3D meshes in your terminal!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy