Coder Social home page Coder Social logo

mo-hanxuan / taichi-voxel-challenge Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 6.53 MB

submit an artwork for taichi-voxel-challenge, ref: https://github.com/taichi-dev/community/blob/main/events/voxel-challenge/reference-zh_cn.md

Python 100.00%

taichi-voxel-challenge's Introduction

image-20220510163400401

image-20220510163430279image-20220510163553191

Figure: result of main.py.

We invite you to create your voxel artwork, by putting your Taichi code in main.py! Refer to taichi voxel challenge for more info.

how to create the pyramids and the Sphinx

We use polyhedrons and ellipses as basic building blocks.

  • polyhedron: defined by several planes, each plane defined by plane normal (pointed to the outside of polyhedron) and a point on this plane
  • ellipse: defined by center, three axises (with lengths) and orientation (where the orientation is defined by rotation axis and rotation angle of counter-clockwise)

Installation

Make sure your pip is up-to-date:

pip3 install pip --upgrade

Assume you have a Python 3 environment, simply run:

pip3 install -r requirements.txt

to install the dependencies of the voxel renderer.

Quickstart

python3 main_pyramids_sphinx.py

Mouse and keyboard interface:

  • Drag with your left mouse button to rotate the camera.
  • Press W/A/S/D/Q/E to move the camera.
  • Press P to save a screenshot.

More examples

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.