Graphics in Julia: Difference between revisions
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
Example of how to create a quad: | Example of how to create a quad: | ||
<syntaxhighlight lang="julia> | <syntaxhighlight lang="julia> | ||
using MeshCat | |||
using GeometryTypes | using GeometryTypes | ||
vis = Visualizer() | |||
open(vis) | |||
# Load the texture | # Load the texture | ||
Line 28: | Line 32: | ||
# Make the geometry | # Make the geometry | ||
# Note that you can also use Array{Float32, 1} instead of Point{3, Float32} for the vertices and the normals. | |||
quadGeometry = HomogenousMesh( | quadGeometry = HomogenousMesh( | ||
vertices = [Point(0,0,0), Point(0,1,0), Point(0, 0, 1), Point(0, 1, 1)], | vertices = [Point(0,0,0), Point(0,1,0), Point(0, 0, 1), Point(0, 1, 1)], |