Giter Club home page Giter Club logo

project's Introduction

Geometry-Draw DSL

UPDATED AUG 31TH

Getting Installed

  1. Download the zip file into your computer.
  2. Open the Terminal (Mac OS) or Command (Windows)
  3. Go to the directory where you keep Geometry-Draw
  4. Type in sbt run and Enter
  5. Ignore the warnings and find the number of myConstructions.main (In the DEMO Video, the number is 2)
  6. Type in the number and Enter
  7. The successful image should be like this

this

Starting Use

Basically, Geometry-Draw has five major functions: Draw, Move, Set, Remove and Mark. However, the Mark function is still under construction due to some unexpected language issues. This file will only introduce the first four functions.

Draw

In Draw function, there are two branches: line and arc.

The grammar for drawing the line is: draw line with ruler from A to B

  • A and B needs to be in Point format, which is: ( , )

The grammar for drawing the arc is: draw arc with compass A from B with radius C from D to E

  • A can be either clockwise or counter-clockwise
  • B needs to be in Point format
  • C, D and E are all numbers

Move

For the rest functions, only two branches, point and line, are available.

The grammar for moving the point is: move point A B C

  • A needs to be in Point format
  • B needs to be one of the following: up, down, left or right
  • C is number

The grammar for moving the line is: move line A B C

  • A needs to be in Line format, which is (Point, Point)
  • B needs to be one of the following: up, down, left or right
  • C is number

Set

The grammar for setting the point is: set point A B to C

  • A needs to be in Point format
  • B needs to be either color or thickness
  • C can be number or string
  • Support colors:
    • red
    • yellow
    • blue
    • gray
    • pink
    • green

The grammar for setting the line is: set line A B to C

  • A needs to be in Line format
  • B needs to be either color or thickness
  • C can be number or string

Remove

The grammar for removing the point is: remove point A

  • A needs to be in Point format

The grammar for removing the line is: remove line A

  • A needs to be in Line format

Demo video

IMAGE ALT TEXT HERE

project's People

Contributors

harrylyf avatar bwiedermann 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.