angerangel / lcr3d Goto Github PK
View Code? Open in Web Editor NEWLivecode 3D library
Livecode 3D library
I don't know what kind of solid "dodecahedron.obj" is supposed to be, but it isn't a dodecahedron; those have 12 (pentagonal) faces (hence the name) and 20 vertices. The file "dodecahedron.obj" describes 50 triangular faces (that would be a pentacosahedron) and 15 vertices. (I find the idea of its dual, which would have 50 vertices for only 15 faces, mind-boggling.) Finally, simple numerical analysis shows that the purported solid cannot be real; 50 triangular faces means 75 edges, so this "solid" doesn't follow the rule that edges=faces+vertices-2.
If you try to load heart, sword or Klingon , you'll notice some wrong polygon. I suspect that is a math error. Livecode sometime tends to consider zero numbers near zero like 0.0000000008.
Is there a way to impose the math precision?
Would it be possible to support a subset of the OpenSCAD language, or to call OpenSCAD (as a module?) and then display the 3D object?
If you create your model and it seems all deformed, check camera position. If you change camera position, you solid will came back to normal.
If the camera is inside a solid, vertex position calculus is a mess.
For example, if you try to load this file, a simple cube:
OFF
8 6 12
0 0 0
1 0 0
1 1 0
0 1 0
0 0 1
1 0 1
1 1 1
0 1 1
4 0 1 2 3
4 7 6 5 4
4 1 5 6 2
4 3 2 6 7
4 4 5 1 0
4 3 7 4 0
You have to move the camera far from the cube.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.