Giter Club home page Giter Club logo

polyhedron's Introduction

polyhedron

Experimenting with Goldberg polyhedra and porting portions of Polyhedronism (Levskaya) to Rblx.Lua.

Progression of development

Starting out

I adapted a lot of code from Levskaya's polyHédronisme, including the creation of Polyhedron objects and Conway's polyhedron operations. This created the base for drawing the objects in Roblox.

Implementing preliminary vertex and face center drawing.

Green = vertex

Red = face center

Originally, I wanted to use a single MeshPart for each polygonal face. This was my attempt.

It was definitely possible that perhaps my math was incorrect, but I decided that I would try out a triangle-based approach and compare the two. From this point on, I figured out the order of vertices that I needed to draw each triangle (3 per pentagon, 4 per hexagon, with 2 WedgeParts per triangle), and drew in each face.

This approach worked well, but there were still some unsightly seams between each edge. This happened because the triangles were positioned using their centers, and not their edges. I fixed this by positioning each triangle inward towards the center by half of their width.

At this point, triangle-based drawing seemed superior to single part-based drawing. Looking carefully, however, I noticed that the faces were not regular polygons. This is likely the reason part-based drawing did not work correctly, and is probably due to the malformation of the seed icosahedron. Regardless, even though the polygons may not be regular, they are still rather close.

The above example is a truncated icosahedron, but by using the dual and triakis operations, you can create even more complex shapes, like a T=9 Goldberg Polyhedron.

Inspiration

Balancing Monkey Games - Before We Leave - https://www.youtube.com/watch?v=m-A0yXP50d4

Resources & credits

Anselm Levskaya - polyHédronisme - https://github.com/levskaya/polyhedronisme

hkrish - StackOverflow - https://stackoverflow.com/a/47455940

Conway polyhedron notation - https://en.wikipedia.org/wiki/Conway_polyhedron_notation

polyhedron's People

Contributors

chaotic-cody avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

polyhedron's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.