grammar_1

grammar_1 - ::= group | sphere sphere ::= Sphere { center...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
6.837 Intro to Computer Graphics, Fall 2003 Assignment 1: Ray Casting Scene description file grammar file ::= camera background group camera ::= orthographicCamera orthographicCamera ::= OrthographicCamera { center Vec3f direction Vec3f up Vec3f size float } background ::= Background { color Vec3f } group ::= Group { num_objects int ( object3D | material object3D ) ^ num_objects } object3D
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ::= group | sphere sphere ::= Sphere { center Vec3f radius float } material ::= Material { diffuse_color Vec3f } Vec3f ::= float float float How to read a grammar: Start with the top level rule, in this case file . To expand a rule, substitute the appropriate definitions for each of the elements in bold. Some special notation: | means "OR" ^ n means "exactly n elements"...
View Full Document

Page1 / 2

grammar_1 - ::= group | sphere sphere ::= Sphere { center...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online