---- DATABASE ERROR ----

Quick And Dirty: Modeling A Coffee Cup In JPatch

by Mike Kost

Introduction

JPatch remains one of our favorite easy-to-use modeling programs. JPatch has an easy learning curve (as opposed to Blender3D) and exports directly to Povray, a definite plus. This latest Quick and Dirty tutorial takes another shot at creating a simple object in JPatch (yes, the coffee cup) and renders it in Povray.

Quick Reading

If you havn't used JPatch or are a bit rusty, best read up:

Getting and Running JPatch

JPatch's latest stable version, 0.4 Preview 1,  can be downloaded from the JPatch download page. When it's unzipped or untarred, the jpatch.jar is in the newly created subdirectory.

To execute JPatch, you need a Java Runtime Environment version 1.4 or later. If you're lacking this, Sun Microsystems will be happy to provide it. Once you have both JPatch and Java, start JPatch with 'java -jar jpatch.jar' on Linux / Unix systems or by double-clicking the jpatch.jar file in Windows.

Useful Functions

Before going into the modeling, lets take a minute to review the JPatch features that we'll discuss. The table below shows the feature, the GUI icon, and the key combination used to enable the feature.

Function Toolbar Icons
Key Combination
Description
Default Tool
Default Tool Icon
ESC
Default pointer
Add Point Add Point Icon
A
Used to add spline points
Lathe Lathe Icon
L
Performs a lathe operation on the selected spline points
Rotate
Rotate Icon
R
Rotate the selected object along the X, Y, or Z axis
Rotate View
Rotate View Icon
Shift-R
Rotate the camera view

Making The Cup

To get started on the cup portion, use the Add Point function to trace out the cross section of half the mug as shown below. If you need to insert a point between two existing points, click on one point, hit the Tab key until the correct curve is green, and hit the Insert key. To join two points together, left-click on one of the points, drag it on top of the other point, and, while still holding down the left mouse button, right click.



From here, select all of the newly-created points and click on the Lathe option. To select all the points, left-click and then drag to place all the points inside the box. The Lathe function will create a solid object by rotating the 2-D points just created around the Y-axis. This tutorial used the default 8 segments.



We now have the cup. To view it in all it's glory, a few steps must be done. Press F5 to get JPatch to calculate the surfaces. To view the surfaces, right click and select Show->Patches. You should now have a gray mug looking at you from the side. The Rotate View function can be used to look at different angles. When you're done looking, press 2 on the number pad to get back to the 'Front' view (or right-click, View->Front View in the grid area).



Continue On To The Next Page Copyright (C) 2006 Mike Kost