Coder Social home page Coder Social logo

aquarium's Introduction

Aquarium

Alec Bell, Jessica Moyer, Rob LaTour 11:10 AM Section (CSE 5542)

To view:

  1. Run an HTTP server out of this directory. You can do this easily with Python from the command line using either of the following commands:
    • Python 2: $ python -m SimpleHTTPServer
    • Python 3: $ python3 -m http.server
  2. Navigate to http://localhost:8000/index.html, assuming it is running on port 8000.

Project Overview

Files/Code

  • JavaScript code is in main.js. This includes a parser draw() for the grammar. Variables are defined at the top (generations, sequences, and rotation angles).
  • Definition of the Fish class is in fish.js.

Flocking

  • The movement patterns of the fish are dictated by a flocking algorithm known as Boids Algorithm.

L-system Grammar

  • The flora on the floor of the aquarium is produced by an L-system.

L-system Grammar Symbols

  • F moves forward 1 unit.
  • - rotates the current line clockwise about the z-axis.
  • + rotates the current line counter-clockwise about the z-axis.
  • [ enters a sub-sequence.
  • ] exits a sub-sequence.
  • > rotates the current line clockwise about the x-axis.
  • < rotates the current line counter-clockwise about the x-axis.
  • R changes the color to red.
  • G changes the color to green (lines are also green by default).
  • # creates a yellow cube (a flower).

aquarium's People

Contributors

gitlessrob avatar alec-bell avatar

Watchers

James Cloos avatar  avatar  avatar  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.