GithubHelp home page GithubHelp logo

grayt's People

Contributors

peterstace avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grayt's Issues

Acceleration structure

Possibilities:

  • Oct-tree.
  • K-d tree.
  • R tree.

Research the different types, and work out which is best. Then implement and speed test.

Add multithreading

Should be able to use N worker threads for computation.

To be specified using the -j flag.

An `Entity` should contain multiple `Surface`s

Currently, Entitys only allow a single Surface. This is a bit annoying for things that are made up of multiple surfaces such as triangles. It would be better to have multiple Surfaces, since they could then share Entity properties such as colour and BRDFs.

Set up CI

This has a few parts that need to be completed:

  • All unit tests should pass (they currently don't).
  • Create a build script.
  • Set up CI in the cloud somewhere.

Acceleration structure crashes

Example:

package main

import (
	. "github.com/peterstace/grayt/examples/cornellbox"
	. "github.com/peterstace/grayt/grayt"
)

func scene() Scene {
	const d = 1.3
	const gap = 0.05
	return Scene{
		Camera: Cam(d),
		Objects: Group(
			Floor,
			Ceiling,
			CeilingLight().With(Emittance(5.0)),
			AlignedSquare(Vect(-10, -10, d), Vect(10, 10, d)),
		),
	}
}

func main() {
	Run("cornellbox_mirrors", scene())
}

Optimise for aligned planes

All planes currently have the same form. They are specified by an anchor point and a normal vector (2 vectors == 6 float64s == 48 bytes). For planes aligned to an axis, it would be more efficient to specify them as an axis), a direction for the normal, and a position on that axis (axis and direction is 1 byte, position is 8 bytes = 9 bytes). The intersection algorithm would also be less computationally expensive.

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.