02-direct-light

command
v0.0.0-...-b718706 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

README

Light and Shadow in 2D

In the future:
On a 2D space, drop some light and check its shadow.

Setup

canvas

A rectangle 125x32.
Beam Sources shooting red light with various angles.

Helper info about canvas, positioning and color pallette in this doc.

Reasoning

TBD

run

# dependencies
go get -u github.com/llgcode/draw2d
# run
go run ./...
open canvas.png
# test
go test ./...

next steps

  • Light the wall based on light hitting in
  • Render obstacles that will prevent the wall from lighting

Much later...

  • Monte Carlo to make it faster!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL