Giter Site home page Giter Site logo

cs535-sketch's Introduction

CS535-Sketch

Sketch is a small application to test primitive drawing algorithms in OpenGL.

Commands

Sketch uses a simplified UI consisting of keyboard commands. Press the H key at any time to toggle a dropdown menu showing each of the commands.

+---------------------+
| H - Toggle Help     |
+---------------------+
| L - Line            |
| O - Circle          |
| S - Curve           |
| C - Clock           |
| P - Control Points  |
| U - Undo            |
| X - Clear           |
| Q - Quit            |
+---------------------+

The first four commands switch the Sketch's drawing state. The current state is displayed in brackets in the bottom left corner of the screen along with the coordinates of the mouse pointer.

The P command shows the control points for any Bezier curves on screen.

The last thre commands do almost exactly what a reasonable person would expect, except that Undo is drawing state sensitive. For example, in the Line state, only lines are removed (in the reverse order that they were drawn).

Drawing

In the Line, Circle, and Clock states, the user clicks the left mouse button down to indicate a starting point, drags the pointer to an end point, and releases the left mouse button. While the left mouse button is held down, a temporary primitive will "rubber-band" beteen the start and end points.

In the Curve state, the user indicates four control points using a full click and release. A line is drawn between each point until the fourth point is drawn and a Bezier curve is generated.

Contact

Christopher D. Parks ([email protected])
hosted on github

cs535-sketch's People

Contributors

cdparks avatar

Watchers

 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.