NeXT TypedStream Data | 1992-08-18 | 16.7 KB | 281 lines
typedstream
StreamTable
HashTable
Object
[20c]
typedstream
[1051c]
typedstream
HashTable
Object
Expression
HeaderClass
%%%%i@@
genericobject_nib
Plot3DView
/usr/include/sys/message.h
viewnib
controller
grids
zoom:
togFreeze:
setMode:
PControl
colorSel
symsel
ffSel
dView
equation
d3View
readFile:
zoomIn:
stoPref:
setMinMax:
zoomOut:
disPref:
clearFile:
FirstResponder
firstnib
checkSpelling:
alignSelCenter:
unscript:
pasteFont:
runPageLayout:
superscript:
copyRuler:
copyFont:
selectAll:
pasteRuler:
toggleRuler:
showGuessPanel:
alignSelLeft:
paste:
performClose:
arrangeInFront:
subscript:
copy:
alignSelRight:
delete:
orderFrontColorPanel:
underline:
performMiniaturize:
DensView
delegate
image
[15956c]
typedstream
HashTable
Object
NibData
@@@@s
Storage
{*@@}
[77{*@@}]
File's Owner
CustomObject
Application
MainMenu
MenuTemplate
*@*@ccc
plot3d
Matrix
Control
Responder
@:@iiii
MenuCell
ButtonCell
ActionCell
Helvetica
Info Panel...
Help...
Preferences...
ff@@#::s
submenuAction:
Bitmap
menuArrow
Paste
Tools
Inspector
Density
Colors...
Print
Page Layout
Print 3D
Print Density
WindowTemplate
iiii***@s@
3d view
Window
CustomView
Plot3DView
Panel
FormCell
MinX:
MaxX:
MinY:
MaxY:
MinZ:
MaxZ:
Field:
Points:
Zoom In
Zoom Out
Freeze
Unfreeze
NXImage
NXradio
NXradioH
Radio
Mouse
MinY
MaxY$
MinZ(
MaxZ,
Form14
Points54
ButtonB>
Set 1
OtherViews
Set 2
Set 3
Set 4
Set 5
PopUpLists
popUp:
popup
NXColorWell
Formula
Symbol
ScrollView
ClipView
ciifffcfffs
[108c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
\margl40
\margr40
\f0\b0\i0\ul0\ql\fs24\fi0\li0\gray0\up0\dn0
NXCursor
NXibeam
Scroller
_doScroller:
@@@ffs
TextField
TextFieldCell
Z(x,y)=
Button1sm
ColorWell
Matrix1
Button3
ScrollingText
Field2
Plot 3d
Steve Ludtke
Version 1.1
2Copyright 1992, Steve Ludtke All Rights Reserved.
meicon
Field1
VersionNumber
Field
[8508c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
\margl40
\margr40
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ul0\fs36 Plot3d Version 1.1\
\b0\fs24 Copyright 1992 Steve Ludtke\
This program is freeware. You may freely copy and redistribute it. Permission is granted to modify the source for your own purposes, but NOT to redistribute the modifications without permission of the author. If you use this program while doing scientific research, please cite this program in the acknowledements of any resulting publications. \
There is absolutely no warrantee on this program. The author takes no responsibility for any damage caused by this program. The author takes no responsibilty for time lost if incorrect or misleading results are produced by this program. If a warrantee is required by law where you intend to use this software, permission to use this software there is revoked. \
Now that that's out of the way, suggestions and bug reports would be greatly appreciated!! I can be contacted at any of the following :\
steve@ion.rice.edu or ludtke@physics.rice.edu\
72335,1537 - compuserve\
Steve Ludtke\
Physics Dept.\
Rice University\
Houston, TX 77251-1892\
\b\ul Changes since 1.0
\b0\ul0 \
Source included\
Full mesh added (for functions only)\
3d view can be resized\
Printing works better (still won't print "dots")\
Alt and az displayed in 3d window\
Zoom In and Freeze added\
ln() changed to log() and log10() added\
Formula input larger\
Formulas can contain '[' and ']' (treated like '(' and ')' )\
Uppercase ok in functions, eg 'Sin(x)' is ok now\
Fixed bug in expressions like : 'x+3.2'\
Infinities/undefined results are dealt with gracefully.\
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\b\ul Plans for the Future:\
\b0\ul0 Get color to work (should be easy).\
Fix density plot so there aren't holes when data is plotted.\
Hidden line/dot removal (I know how to do it, it will just take some time ...)\
Tic marks and/or a scale on the plot.\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 Improvements to function parser (since I didn't write it,this can be tricky)\
More flexible spinning options.\
\b\ul \
Introduction
\b0\ul0 \
There are a variety of programs on the NeXT that will generate nice, publication quality, 3d plots (Mathematica, gnuplot, etc ...) However, there seems to be a lack of programs which allow real time interactive rotation and comparison of 3d data and formulas. Plot3d is an attempt to fill that gap.\
The plots generated by plot3d aren't publication quality, and they aren't designed to be. The display algorithm used by plot3d is specifically designed for speed, not quality. While the NeXT is a pretty speedy machine, spinning 3d plots around on the screen in real time approaches the limits of it's capabilities. This program is especially good at doing quick plots to compare data with formulas, and to determine the best viewing angle to use with publication quality, but slower, programs.\
\b\ul Using Plot3d
\b0\ul0 \
\b Spinning:
\b0 Plot3d will start with a spinning sample function on the screen. This will give you an opportunity to become accustomed to the interface. To control the viewing angle and spin of the plot, drag around the plot window with the mouse. If the pointer is still moving when you release the mouse button, the plot will continue to spin on the screen. To stop the spinning (and massively reduce the load on your NeXT), click the mouse without moving it. If you don't do this just right, the display may appear stationary, but still be spinning very slowly. If this is occuring the mouse pointer will appear to flicker slightly when it is over the 3d view, and your machine will appear unusually slow. Updates occur at up to 10 times per second, but with a large number of points this will be reduced considerably. Spinning only occurs in the azimuthal (x-y plane) angle, the altitude remains where you last left it.\
\b Zooming:
\b0 Changing MinX,MinY,MaxX or MaxY manually will cause a corresponding change in the visible region of the plot. You may also zoom in on a region of the plot using the mouse in zoom mode. It's a bit difficult to describe, but in mouse mode, the region is selected as if the plot were being viewed from directly overhead, no matter how it's currently oriented. Playing with it is the best way to understand what I'm trying to describe. Zoom out and zoom in are self-explanitory. The easiest way to zoom is to use the :\
\b Density Plot:
\b0 \
To make zooming easier and to provide an alternate way to view the data, a density plot is provided. Obviously only one set at a time can be displayed on the density plot, so only the plot currently selected in the Inspector panel will be displayed. If the set is turned "off", the density plot will remain blank. The mouse mode does not affect the density plot. Dragging the mouse on the density plot will always cause zooming.\
Both functions and files can be displayed in the density plot window, but you may need to play with the resolution to prevent 'holes' from appearing when files are viewed.\
\b Resolution:
\b0 The Points selector in the Control window allows you to select how many points in x and y to sample when plotting equations. Changing this parameter for data files will effect only the density plot, the 3d view will be unaffected.\
\b Symbols:
\b0 Plot3d can plot up to 5 simultaneous data sets. Each set can use one of 7 different display styles (or be turned off). Most of the time required between updates on the display is taken by the actual drawing process. If the display begins to slow down, try using the dot or 1/2mesh symbols (they're the fastest to draw). You must click OK for a new symbol to take effect. The full mesh does not work on files.\
\b Colors:
\b0 \
Unfortunately I only have access to a monochrome NeXT, so for the moment only greyscale "colors" can be used. There is a colorwell in the inspector window. You can bring up a color selector using the tools menu. Drag a color into the well on the inspector, then click OK to make it take effect. Any non-grey color will currently be mapped to its corresponding gray value.\
\b Formulas/Files:
\b0 Plot3d can plot both 3d data files and non parametric formulas. Formula parsing is done using Trey Matteson's Expression object (from the "graph" example in the extended release of 2.1). The parser currently supports the following expressions (more functions can be added upon request):\
Variables x and y (sometimes z)\
Numbers in normal, exponential, or radix (16#FE3, 2#11011) form\
Simple operators +,-,*,/,% and ^. (% == modulus)\
Parentheses and square brackets\
Constants pi and e\
Functions: sin(),cos(),tan(),asin(),acos(),sqrt(),.log(),log10(),exp() (log and exp are base e)\
\pard\tx1340\tx6080 (more functions can be easily added if people tell me what they want)\
I have tried to add a few things to make Mathematica and C style expressions more acceptible to plot3d. Square brackets now work, and capitalization in function names is now ok. pow(x,y) is still not valid, and whitespace is not interpreted as multiplication. If you have any specific suggestions on things I should add/change to increase compatibility, let me know.\
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320 Selecting "file" will bring up an Open Panel. Files must be in "x y z\\n" or "x,y,z\\n" format with optional comment lines at the top of the file beginning with #. If the selected file cannot be read, "formula" will automatically be reselected. Once the data is read, x/y/z max/min values will be set to match the file. Data from the file is NOT interpolated, so if you zoom, the data will not be mapped to a new grid, it will just be clipped. \
Data from files may also be transformed before being displayed. You may enter a formula as a function of x,y and z to remap the data. When the file is read, the formula is automatically reset to z(x,y)=z. So, for example, if you want a log plot, just enter "log(z)" as the formula. If you enter an invalid formula it will be reset to "0". \
Suggestions and/or comments would be greatly appreciated. If I don't hear from people, I will assume that nobody's using it, and stop working on it. It's already at a level sufficient for my own use, so if you'd like something changed, let me know !!!\