Coder Social home page Coder Social logo

cs594-lab1's Introduction

J-Grangle

Description

J-Grangle is a program which produces an image of the given object file in jgraph format.
It is a mix of jgraph and rangle, which is in turn a mix of Rust and triangle.

TA Testing

To re-generate the example outputs, run $ make clean && make.
First, the program will compile. Then outputs 01-*.jpg through 11-*.jpg will be generated.
Because this program is doing graphics work on a CPU, it may take a moment to finish. For example, on a Hydra machine, the whole process took around 3 minutes.
We thank you for your patience.

Usage

The executable is located at target/release/j-grangle.
However, you may also run it with $ cargo run --release -- [OPTIONS].

J-Grangle 

USAGE:
    j-grangle [OPTIONS] <OBJ-FILE> <width> <height>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -b, --background <background_color>    The background color [default: 0 0 0]
    -m, --mode <mode>                      The display mode used to render the model [default: triangles]  [possible
                                           values: triangles, lines, points]
        --pitch <pitch>                    The value in radians to rotate the model around the x-axis [default: 0]
        --roll <roll>                      The value in radians to rotate the model around the z-axis [default: 0]
    -s, --scale <scale>                    The x y z values to scale the model by [default: 1 1 1]
        --shader <shader>                  The pre-compiled set of shaders to use [default: normal]  [possible values:
                                           normal, solid]
    -c, --color <shader_color>             The color of the object
    -t, --translate <translate>            The xyz values to translate the model by [default: 0 0 0]
        --yaw <yaw>                        The value in radians to rotate the model around the y-axis [default: 0]

ARGS:
    <OBJ-FILE>    Path to obj file
    <width>       The width in pixels
    <height>      The height in pixels

Examples

$ j-grangle obj/teapot.obj 1000 1000 | jgraph -P | convert - 02-teapot-hd.jpg

$ j-grangle obj/teapot.obj 500 500 --mode lines --background "0.5 0.5 0.5" | jgraph -P | convert - 05-teapot-background.jpg

$ j-grangle obj/bunny.obj 500 500 --scale "30 30 30" --translate "-1 2 0" | jgraph -P | convert - 10-bunny-translate.jpg

cs594-lab1's People

Contributors

isikkema 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.