Home
CPLOT User`s Manual
Contents
1. COLOr rgb Set the color to red r green g blue b All values between 0 and 1 CPLOt ncurve Plot curve ncurve as a B zier curve CPPL ncurve Plot the control polygon of curve ncurve TEXT pointsize x y string Print the text string starting at x y Use a font of pointsize points VIEW Tmin Ymin Umax Ymax WIND Lmin Ymin Umax Ymax A window is a rectangle that encloses the scene The window s corner coordi nate values min Emax Ymin Ymax are given in scene coordinates A viewport is a second rectangle that specifies where the scene contained in the window should be plotted on the page The page is taken to be a square sheet of paper with page coordinates running from 0 0 in the lower left corner to 1 1 in the upper right corner The viewport is defined in terms of its values Lmin Tmax Ymins Ymax N page coordinates The value 22 min i called the aspect ratio If the window and viewport do not have the same aspect ratio the resulting picture will be distorted Window and viewport commands should appear prior to any CIRC or CPLOT commands Sample File The file eg1 dat contains the following drawing commands VIEW 2 2 8 8 WIND O O 150 150 colo 100 widt 3 bord colo 000 text 18 50 100 Hello World circ 100 100 70 STOR 5 3 40 45 50 90 95 90 95 45 CPLOT 5 CPPL 5 EXIT BPRPRPP oO O00 When this file is processed using cplot cplot eg
2. CPLOT User s Manual September 14 2010 CPLOT is a simple C program actually it is pretty much just C that reads in a file of commands and creates a PostScript file CPLOT provides a framework that will allow you to implement algorithms such as de Casteljau degree elevation curve intersection NURBS knot insertion etc and to write the results to a PostScript file for viewing The source code for CPLOT is in a single file under 200 lines in length It will compile and run in Windows Mac OS X and Linux If the executable is named cplot and the input data file is named test dat the command line cplot test dat test eps will process the input file and create a PostScript file called test eps CPLOT Input File Format Each CPLOT command occupies a line by itself Commands are not case sen sitive and only the first four characters are significant Most commands are followed by data values found on subsequent lines The commands are CIRC xyr Plot a circle of radius r centered at x y STORe ncurve degree To Yo Wo T Y W1 T2 Y2 W2 Tn Yn Wn Store the control points of a degree n rational B zier curve and assign it a curve number of ncurve for future reference The reason that curves are stored rather than plotted immediately is to allow us to more easily perform such operations as subdivision and degree elevation The w values are weights For a conventional polynomial B zier curve simply set all w values to 1
3. i dat egl eps an eps file named egl eps is created that contains the following picture Hello World Figure 1 Scene from file eg1 dat
Download Pdf Manuals
Related Search
Related Contents
Roberts 70-115 Installation Guide Fiches pédagogiques d`aide à la qualiFication d`un projet de Setup Guide BM-7A Otto Bock Ankle Seven Carbonfeder Otto Bock Carbon Ankle Seven HP DesignJet 815MFP User's Manual 50 SLI Deck Supplement - Laird Manufacturing Corporation Panasonic MC-V7314 Vacuum Cleaner User Manual Makita 6935FDWAE User's Manual Copyright © All rights reserved.
Failed to retrieve file