1. Homepage
  2. Programming
  3. CS 3451 Introduction to Computer Graphics - Project 4: Implicit Surfaces

CS 3451 Introduction to Computer Graphics - Project 4: Implicit Surfaces

Engage in a Conversation
Implicit Surfaces3D modelsRay TracingSurface NormalsCS 3451CS3451Introduction to Computer GraphicsUSGeorgia Tech

Project 4: Implicit Surfaces

Start Assignment CourseNana.COM

Objective

The goal of this project is to give you experience creating 3D models using various implicit surface techniques.  You will implement distance functions and also modulate these distance functions using falloff functions to make them "blobby".  You will create blobby versions of several primitive shapes, including sphere, line segment, box and torus shapes.  By virtue of their blobby nature, you will create complex shapes by allowing several primitives to blend together.  You will also demonstrate advanced deformation operators, including twist, taper and bend.  You will also show how implicit functions can be used for shape morphing and constructive solid geometry (CSG).  Finally, you will create your own implicit surface that will demonstrate the use of several of these techniques working together. CourseNana.COM

Provided Code

You should start from the PROVIDED CODE for this project. CourseNana.COM

The most important part of this code is a full implementation of iso-surface extraction using the marching cubes algorithm. You should NOT implement the iso-surface extraction process yourself, since doing so is well beyond what is being asked for in this assignment.  By default, the provided code displays an implicit sphere. CourseNana.COM

Project Description

Unlike the ray tracing projects, you will not be provided with text-based descriptions of scenes.  It will be up to you to assemble pieces of code that achieve the required visual results of this project. There are at least three kinds of routines that you will need to implement in order to carry out this assignment: CourseNana.COM

1) distances to shapes (sphere, line segment, torus) 2) blobby fall-off (basis) function 3) transformation and deformation of coordinates Most of the tasks for this project will require you to combine at least (1) and (2) to get a particular result. Some of them will require you to combine all three kinds of routines. CourseNana.COM

I used the Wyvill blobby function for the results shown on this page:  blob(d) = (1-d^2)^3.  You can probably get similar results from the Gaussian blobby function. CourseNana.COM

Using Lambda Expressions to Define Implicit Functions

In order to have a flexible routine for extracting a polygonal iso-surface, we need to be able to tell the surface extraction routine what implicit function is to be used. There are several ways to achieve this, but perhaps the most flexible is to provide a function to the surface extraction routine. Such a function should take a 3D position (x, y, z), and return a floating point value f(x,y,z).  There are several ways in which a function can be passed to another method, and we will use lambda expressions to do this. CourseNana.COM

Familiarize yourself with the syntax of a lambda expression and how to assign them to a variable name that can be passed to the iso-surface extraction routine.  The syntax for a lambda expression is a little bit like the syntax for a method, but the types of the parameters are not specified, and the symbol -> comes after the parameters.  Also note that when you assign a lambda expression to a named variable, this expression needs to be terminated with a semicolon.  Here is a part of the provided code that creates a lambda expression for a sphere: CourseNana.COM

ImplicitInterface a_sphere = (x, y, z) -> {
  float d = sqrt (x*x + y*y + z*z);
  return (d);
};

A lambda expression can call other functions and methods. You could, for example, create a blobby sphere function and then call it from a lambda expression.  Notice in the above code that the function sqrt() is called by the lambda expression. CourseNana.COM

Note that any global variables that you use in a lambda expression must be defined prior to their mention in a lambda expression.  The easiest way to achieve this is to make sure such global variables are defined at the top of the same .js file (or Processing tab) that also contains the lambda expression. CourseNana.COM

Surface Normals and Smooth Shading

There is a currently unused boolean called "normal_flag" in the provided code.  When this flag is toggled on by pressing the "n" key, your program should smoothly shade the implicit surface that is being displayed.  To perform smooth shading, you will need to estimate the implicit function's gradient at each polygon vertex, and use this gradient to calculate the surface normals for the vertex.  When that polygon is displayed, you will need to call the normal(nx,ny,nz) function before each vertex(x,y,z) command, and this will give you a smoothly shaded surface. CourseNana.COM

Additional Interactive Controls

The provided code allows you to rotate the model by dragging the mouse across the display window. You can move the camera closer or farther from the model using the UP and DOWN arrow keys.  You can reset the rotation and camera position with the "r" key. CourseNana.COM

The "e" key toggles between showing and not showing the polygon edges. The grid resolution for iso-surface extraction can be decreased or increased by pressing the "," and "." keys. CourseNana.COM

Scaling a Blobby Primitive

There are several ways in which you can make a blobby primitive larger or smaller, but these different methods do not all give the same results.  One way to scale a blobby primitive is to scale the (x,y,z) coordinates before you pass them into the primitive's distance calculation.  Another way to scale a primitive is to scale the resulting distance that you get from the primitive.  A third way to scale a blobby primitive's appearance is to change the iso-surface threshold.  Changing the iso-surface threshold is the least flexible of these methods, since the same threshold is used across all of the primitives that you sum together.  You can scale the input coordinates or the resulting distances on a per-primitive basis, which gives you more flexibility. CourseNana.COM

Keep these different size change methods in mind as you work on achieving the various results of this project.  In many of the examples, I shrank the size of a blobby sphere or a line segment to get the result that I wanted. CourseNana.COM

Resulting Surfaces

As in earlier assignments, each of the desired results should be tied to particular keys that the user presses.  For each such key press, it is up to you to call the code that you will write to create each of the example surfaces.  For instance, the provided code creates a sphere when the user presses the "1" key. Below are descriptions of each surface for you to create, along with one or more images that show the kind of output your program should create.  Most numbered keys are paired with their shifted versions (e.g. "1" and "!"), and such paired results will usually require the use of similar methods to get the desired results. CourseNana.COM

Key 1

Draw a single implicit sphere.  The code to do this is already provided as an example.  Below are renderings of this default sphere, one showing the edges, another using flat shading, and the third that shows what smooth shading should look like. CourseNana.COM

Key !

Draw a flattened sphere that looks like a flying saucer.  You should be able to achieve this by nonuniformly scaling of the x, y, z coordinates before passing them into the sphere routine. CourseNana.COM

Key 2

Draw pairs of blobby spheres that are partially blended together.  Draw one pair so that they are close together, and another where they have a small bridge connecting them. CourseNana.COM

Key @

Draw a bunch of 10 randomly placed blobby spheres that are colored randomly. Try to make the spheres small enough that they don't just make one big blob.  It is okay if some of the blobby spheres are clipped at the edge of the iso-surface extraction region. Each time you press the key, a new set of random spheres should be created.  Below are several examples of such blobby spheres. The colors of each blobby sphere should gradually change into the colors of any other spheres that it blends with. CourseNana.COM

Key 3

Create and draw an implicit line segment. CourseNana.COM

Key

Draw four blobby implicit line segments that blend together to form a blobby square. CourseNana.COM

Key 4

Draw an implicit torus.  They equation for a torus is (x^2 + y^2 + z^2 + R^2 - r^2)^2 - 4R^2 (x^2 + y^2), where R is the major radius and r is the minor radius. CourseNana.COM

Key $

Draw three blobby tori that are stuck to each other.  Make them each rotated by 45 degrees with respect to each other.  Remember that rotating the input coordinates for an implicit function has the effect of rotating the resulting shape. CourseNana.COM

Key 5

Create one thin implicit line segments that has its long axis parallel to the x-axis.  Offset the line segment vertically so that its center is offset from the x-axis. CourseNana.COM

Key %

Take the thin line segment from Key 5 and warp its shape using a twist deformation.  The twist should be around the x-axis.  You need to make sure that your line segment is not directly on the x-axis, otherwise you will not be able to see the effect of the twist.  Because this surface has sharp edges, you will need to increase the grid size of marching cubes to make the edges look good. CourseNana.COM

Key 6

Implement the taper deformation, and use it to create a tapered line segment. CourseNana.COM

Key ^

Use both taper and twist together to deform a line segment. CourseNana.COM

Key 7

Perform boolean intersection between two spheres to make a saucer shape that has sharp edges. CourseNana.COM

Key &

Perform a boolean subtraction that punches a hole through a sphere.  Use an implicit line segment to create the hole.  Because of the sharp edges of the hole, you will probably have to increase the grid resolution to make this look good. CourseNana.COM

Keys 8 and 9

Allow interactive morphing between a sphere and three intersecting line segments.  The morph should be controlled by a global parameter that the user decreases or increases using the 8 and 9 keys.  When either such key is pressed, the current version of the morph should be displayed.  Each time the 9 key is pressed, the morph parameter should increase by 0.1, and each time the 8 key is pressed, the parameter should decrease by 0.1.  Below are four images that show the morph at different stages. CourseNana.COM

Key 0

Create your own 3D object using blobby implicit shapes. Your object should not just be a random assembly of parts. Instead, it should be something that is recognizable, such as an animal, a vehicle, furniture or a character.  Your implicit object needs to show off several implicit modeling techniques together.  Here are the requirements for your object: CourseNana.COM

  • The object must be assembled from at least 12 blobby primitives.
  • Uses at least two different kinds of blobby primitives (spheres, line segments, tori).
  • Your object should be one connected surface instead of several unconnected pieces.
  • The final object should be something recognizable instead of random.
  • Demonstrate non-uniform scale of an implicit primitive.
  • Demonstrate rotation of an implicit primitive.  Make it obvious that a primitive has been rotated (avoid
  • 90, 180 and 270 degree rotations).
  • Incorporate either a twist or a taper deformation.
  • Provide a screen shot of your object as part of your project submission (e.g. my_object.jpg).

Feel free to change the surface color if you like, so that the color is different than the default white. Change in color is optional. CourseNana.COM

Below are two example objects for inspiration that are from the dissertation of Erwin De Groot.  Note that these two examples may not satisfy all of the requirements listed above, but your surface should! CourseNana.COM

Authorship Rules

The code that you turn in entirely your own. You are allowed to talk to other members of the class and to the instructor and the TA’s about general implementation of the assignment. It is also fine to seek the help of others for general Processing/Java programming questions. You may not, however, use code that anyone other than yourself has written. The only exception is that you should build on the provided code for this assignment. Code that is explicitly not allowed includes code taken from the web, Github, from books, from the processing.org web site, from other students or from any source other than yourself. You should not show your code to other students. Feel free to seek the help of the instructor and the TA's for suggestions about organizing and debugging your code. CourseNana.COM

Submission

You will turn in your code via Canvas.  In order to run Processing source code, it must be in a folder named after the main pde file.  For this reason, when submitting your project, you should keep your code in this folder, zip up this folder, and submit this single zip file via Canvas.  Make sure that your project folder contains the "data" sub-folder and the .cli files it contains.  Also remember to include an image of your object from key press zero.  Please do not use tar or rar to turn in your files. CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Implicit Surfaces代写,3D models代写,Ray Tracing代写,Surface Normals代写,CS 3451代写,CS3451代写,Introduction to Computer Graphics代写,US代写,Georgia Tech代写,Implicit Surfaces代编,3D models代编,Ray Tracing代编,Surface Normals代编,CS 3451代编,CS3451代编,Introduction to Computer Graphics代编,US代编,Georgia Tech代编,Implicit Surfaces代考,3D models代考,Ray Tracing代考,Surface Normals代考,CS 3451代考,CS3451代考,Introduction to Computer Graphics代考,US代考,Georgia Tech代考,Implicit Surfaceshelp,3D modelshelp,Ray Tracinghelp,Surface Normalshelp,CS 3451help,CS3451help,Introduction to Computer Graphicshelp,UShelp,Georgia Techhelp,Implicit Surfaces作业代写,3D models作业代写,Ray Tracing作业代写,Surface Normals作业代写,CS 3451作业代写,CS3451作业代写,Introduction to Computer Graphics作业代写,US作业代写,Georgia Tech作业代写,Implicit Surfaces编程代写,3D models编程代写,Ray Tracing编程代写,Surface Normals编程代写,CS 3451编程代写,CS3451编程代写,Introduction to Computer Graphics编程代写,US编程代写,Georgia Tech编程代写,Implicit Surfacesprogramming help,3D modelsprogramming help,Ray Tracingprogramming help,Surface Normalsprogramming help,CS 3451programming help,CS3451programming help,Introduction to Computer Graphicsprogramming help,USprogramming help,Georgia Techprogramming help,Implicit Surfacesassignment help,3D modelsassignment help,Ray Tracingassignment help,Surface Normalsassignment help,CS 3451assignment help,CS3451assignment help,Introduction to Computer Graphicsassignment help,USassignment help,Georgia Techassignment help,Implicit Surfacessolution,3D modelssolution,Ray Tracingsolution,Surface Normalssolution,CS 3451solution,CS3451solution,Introduction to Computer Graphicssolution,USsolution,Georgia Techsolution,