Giter Club home page Giter Club logo

bezier-funhouse's Introduction

Running

I mostly am pretty happy with this code. The major outstanding issue is some discontinuties in the normals; it's unclear if this is a correctness issue on my part or if the subdivision scheme is just not precise enough to get this right; there are a few more details below.

There are some performance issues on my machine (which is not the best, especially GPU wise), especially to do with compiling the shader. Just a warning to expect that to take a little while.

Basics

Slerping works, mostly. It's certainly better than without interpolation:

Slerping

There is still some issue with discontinuities. Either my slerping is not accurate enough, or more subdivisions are needed. Here's a picture with a more extreme curve which demonstrates this:

Slerping Discontinuities

It's totally possible there's a numerical error in my code somewhere. However, I think this could also be just an issue with the granularity of this subdivision scheme; similar discontinuities (in particular slight square-ish-ness of reflections of spheres) seem to exist in the example photo.

The mirror's shadow also works, though it's very binary, and so it doesn't look great:

Shadows

Extras

There's an optional toggle for multibounce:

Multibounce

Here's no multibounce, for comparison:

No multibounce

This seems to work, mostly. The major issue is likely not with this code. Instead, the discontinuities from slerping (whether because of a numerical error in my code or insufficient subdivision depth) become significantly more noticeable when multibounce is enabled; presumably this is because the effect is cumulative.

Here's another one with multbounce, this time with much less subdivision; this is probably my favorite picture to come out of this:

Multibounce 2

bezier-funhouse's People

Contributors

rileyshahar avatar

Watchers

 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.