Giter VIP home page Giter VIP logo

openglot3d's Introduction

OpenGLot3D

This was a project I worked on around 2009-2010. I'd become enamored of graphics, and was experimenting with different techniques for visualizing mathematical concepts.

This offers a number of primitives which are then rendered on the GPU:

  • parametric curves
  • parametric surfaces
  • surfaces

Each of these primitives also supports a term for the current time since the program is running.

Demos

There are demos which allow the use to provide a function to render. Some good examples are listed by the --help flag on the driver:

Examples: 

  Surface:
    ./driver --surface 'sin(3.0 * sqrt(x * x + y * y) - 2.0 * t) * exp(-sqrt(x * x + y * y)/5.0) * cos(5.0 * sqrt((x - 1.5) * (x - 1.5) + (y - 0.75) * (y - 0.75)) - t)'

  Parametric surface:
    ./driver --p-surface 'pow(abs(sin(t)), u * 18.0) * (1 + cos(v * 6.0)) * cos(u * 18.0), pow(abs(sin(t)), u * 18.0) * (1 + cos(v * 6.0)) * sin(u * 18.0), pow(abs(sin(t)), u * 18.0) * sin(v * 6.0) - 1.5 * pow(abs(sin(t)), u * 18.0)'

  Toroid:
    ./driver --cylindrical --p-surface '2 * 6.3 * v, 3 + sin(6.3 * v) + cos(6.3 * u), sin(6.3 * u) + 2 * cos(6.3 * v)'

  Curve:
    ./driver --cylindrical --p-curve 'u * 19.0, (2.0 + cos(7.0 * u * 19.0 / 3.0)) * (1 +  abs(sin(t))), sin(7.0 * u * 19.0 / 3.0)'

Gallery

A surface with color-encoded normals:

Surface

A seashell:

Seashell

A toroid:

Toroid

State

This code does not have unit or integration tests. It has not been maintained since 2010.

openglot3d's People

Watchers

James Cloos avatar Dan Lecocq avatar

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.