home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
geo_demo
/
csc5.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1992-07-17
|
38KB
|
909 lines
XView
CyberSpace Cruiser
ppppp
Form1
Picture7
CommText
Picture2
RunButton
Spare
StopButton
Spare
ExitButton
Picture1
PanUDScroll
ViewPic
Picture4
BackForScroll
Picture5
Label1
Label1
Label2
Label2
Label3
Label3
Label4
Label4
Label5
Label5
SCCheck
Spin the cube
AFButton
Picture3
PanLRScroll
PlusButton
MinusButton
MenuFile
&File
FileExit
E&xit
MenuAction
&Action
ActionJump
&Jump to Coordinate
JumpAbsolute
&Absolute
AbsoluteX
AbsoluteY
AbsoluteZ
JumpRelative
&Relative
RelativeX
RelativeY
RelativeZ
MenuView
&View
ViewFine
&Fine Position Controls
ViewAboutFace
&About Face Button
MenuHelp
&Help
HelpUsing
&Using CyberSpace Cruiser
HelpViewport
The &Viewport
HelpHyphen1
% HelpAbout
&About CyberSpace Cruiser
Form_Clickq
CircInterSect
Sigma1+
Sigma2
PartA
PartB
Sigma
PartC.
Command1_Click"
Command2_Click
GeoPic
Command3_Click
ExitButton_Click
ClearButton_Click
TestButton_Click
drawWidthK
sfAngle1
dfLinkLen
dfLever2LenU
dfLever2X
dfLever2Y
DrawMech
LeverEndX
LeverEndY7
MechPic
VScroll1U
valueA
@ Form_Load
RunButton_Click
VScroll1_Change$
iAnglec
RunButton
enabled
StopButtonL
TestButton
StopButton_Click
VScroll2_ChangeH
dfLever2
VScroll2
VScroll1_GotFocus
ExitButton
VScroll2_GotFocusd
Form_Paint-
BorderBoxRaised
Picture1C
Picture2
Picture3
CubeOpt_Click
CubeOpts
ScaleWidth
ScaleHeight
ScaleTopb
scaleleft
LinkOpt_ClickZ
LinkOpt7
smallchange
largechange
DrawAxis
Alpha
iEraseB
sfAlpha
sfBeta
singe>
dfCubeVertX
dfCubeVertY
dfCubeVertZ:
GeoPic_Click
drawstyle
DrawCube
CubeVertX
CubeVertY
RotateCubeI
ForeColor
Rotate
Theta
Theta1
RotatePoint
SolidRotate.
dfAlpha
dfBetae
dfCubeVertX0u
dfCubeVertY0
dfCubeVertZ0
dfCubeVertX1
dfCubeVertY1
dfCubeVertZ1X
NewCube3
dfCubeVert0g
CenterOfRotation]
dfCubeVert16
Printed)
RunCubeRotationK
Visible
WipeNewCube
enable<
CircInter
ViewPic
XView
ViewPic_Click
Picture4
Label1
caption
Label2
Label3
sfViewPointX
sfViewPointY
sfViewPointZ+
sfWinPointX8
sfWinPointYE
sfWinPointZR
sfRPointX_
sfRPointYl
sfRPointZ
sfSPointX
sfSPointYI
sfSPointZ
sfAzimuth~
sfElevation
PanUDScroll_Change
PanUDScroll#
Label4t
Label5
PanLRScroll_Change_
PanLRScroll
BackForScroll_Change-
OldValue
NewValue
DeltaX
sfOldLinPosp
DeltaLine
BackForScroll
iOldLinPos
iOldLine
DeltaY
DeltaZ
Travel
Label6
sfWin>
Delta
BackForScrollminE
iOldAzimuth
iOldUDAnglel
iOldLRAngle
DeltaUD
DeltaElevation?
DeltaLRW
DeltaAzimuthp
DrawView
MakeCube
sfObjectX
sfObjectY+
sfObjectZ
VertexL
iObjectX
iObjectY
iObjectZ
PlaceCube
PlaceObject)
object
iNumPoints
PxStarg
PyStar>
PzStar%
sfRPointO
sfWinPoint
iObjectT
MakeObject
Shape
left|
OldPx
Staric
OldPy
PxOldU
PyOld>
MinZp
thenViewPic
OriginX
OriginY
OriginZ
Label7
NewXo
NewZO
PzOld
PlaceAllObjects
ObjNum
bThen
ObjTyp
Static0PxOld
PointXold
PointYoldd
Color4Bit
SizeFactor&
IfThen
PointZold
NumObjects6
distance
DSquaredI
LocationX
LocationY
LocationZ|
SortX
objects-
their
distances
squared
ObjOrder
NumVendors
sVendor9
Temp1
Temp2
Company
Temp35
Address
Temp4O
Temp5
Temp6
State
Temp7Z
Temp8
TechSpt
Temp9/
Sales
Temp10E
CustServ
Temp11
Country-
Temp12b
Contact
DefineAllObjects
ObjectTypel
Color
ObjType
printDSquared
SphereXOld
SphereYOld+
SphereZOld
MapRadius
fillstype8
FillColor5
fillstylee
qbcolor7
sfArcSinT
MakeObjects
OldRadiusf
LetterAfbXoldw
LetterAfbYold
LetterAfbZold
TestForFlatLine
iFlatLined
FlatLine
backcolor
Letter
Fronte
LineXold
LineYoldH
LineZold
LetterIfbXold#
LetterIfbYold4
LetterIfbZoldD
LetterSfXoldT
LetterSfYoldd
LetterSfZolds
LetterTXold
LetterTYold
LetterTZoldj
FlatLined
LetterYXold
LetterYYold
LetterYZoldk
BorderBoxRecessed6
Picture5
LetterWXold
LetterWYold
LetterWZold
CrossWordCubesJ
BlueAI
BFScrollHandlerZ
BFScrollResumez
GuardDiamondsz
DiamondXold
DiamondYold
DiamondZold$
Text1
iPuzzleMode
LocationModesV
iNumCells
iCellSize
ViewPic_MouseDownY
Button
Shift
iCellLocX
iCellLocY
iCurrentCell
debubq
ViewPic_KeyPress
KeyAscii
iNumObjects
NumCellsQ
LetterArcheType
GetLetterQuadrature
GetLetterQuad
ViewAngleF
location
LetterBXold
LetterBYoldq
LetterBZold
iAIindex
iAInum
iObjectType
iLetterArcheType
iLocationXj
iLocationY
iLocationZ
iColorO
iColor4Bit
QBiColor
filliColor_
BackiColor
sfSize
iCellsfSize
sfSizeFactor
liDSquared
iObjOrder
ScaleMode^
AutoRedraw
FloodFillc
sfPSF,
FillSqXold:
FillSqYoldH
FillSqZold
Screen
height
currentx
currenty,
FloodX
FloocY
FloodYY
FlodPic
CenterXstar
CenterYstarj
CenterZstarw
BailOut
OldCx
OldCy
OldCz
Skip(
SkipPlace
SkipErase
iSkip
thenPlaceObject
iSkipPrevw
iObjTypeX
iSkipThen
notiSkipPrev
iInView
iInViewPrev
inView8
sfAvX3
sfAvY
sfAvZ
PointalistXold
PointalistYold
PointalistZold
PyXtar
mousepointer|
BigRedCube
PointNumG
LetterCXoldV
LetterCYold
LetterCZold
FileExit_Click
MenuEdit_Click
HelpAbout_Click
intellectual
Picture6
paint
ViewPic_paint(
EraseBoxF
BoxEraseT
ClueText
text(
LetterDXold7
LetterDYoldO
LetterDZold
width^
LetterEXoldm
LetterEYold
LetterEZold
Picture7
PicBorderBoxRecessed
ClueBoxI
CommText
LetterFXold
LetterFYold
LetterFZold
ClueAu
iJump
LetterGXold
LetterGYold+
LetterGZold:
LetterJXoldI
LetterJYoldj
LetterJZold
ViewReal_Clicky
LetterKXold
LetterKYold
LetterKZold
LetterLXold
LetterLYold
LetterLZold
LetterMXold
LetterMYold
LetterMZold
LetterNXold
LetterNYold
LetterNZold-
LetterOXold<
LetterOYoldK
LetterOZoldZ
LetterPXoldi
LetterPYold>
LetterPZold
LetterA
LetterB
LetterCQ
LetterY
LetterWI
LetterT
LetterS
LetterP
LetterO
LetterN
LetterM
LetterL
LetterK
LetterJ
LetterH
LetterG
LetterF
LetterE
LetterDh
LetterQ
LetterR
LetterX
LetterU
CubeSurface
ClueD
svViewPointZ'
ViewFine_Click
ViewFine
checked
PlusButton
MinusButton~
PlusButton_Click
MinusButton_Click
HelpUsing_Click4
HelpPlaying_Clicka
HelpStoring_Click
itemm
ActionJump_Click
ActionLog_Click
Result
sUserName<
PassWord
ActionLog,
FileOpen
FileSave
FilePrint_ClickK
printer1
FileSave_Click
iLevelC
FileSaveHandlerV
FileSaveResume
iDirty
FileOpen_Click
FileOpenHandler
FileOpenResume
oriLetterArcheType
StartUp
Form_Resize
CyberSpaceg
Cruisers
QuadOldX
QuadOldY
QuadOldZ
Points
PointAPIY
Polygon
MakeLetters
YellowClusteru
IvoryTower
iMoveDisable/
iOldLinePos
lOldLinPos
lNewLinPos(
iOldChange
DeltaScroll
iOldScroll
iReWind
ViewAboutFace_Click
AFButton
ViewABoutFaceH
AFButton_Click
TempVert
TempHort<
iAboutFace
Picture7_Click
ViewPic_DblClickT
DeltaVerte
sfMDownXw
sfMDownY
DeltaHort
HelpViewport_Click/
PointCubes!
RadiusT
Alphsk
sfDSquared
NewHort
Square
center
viewpointM
iLocOKG
TempX%
Tempy
TempzJ
sUser1
ActionJump8
AbsoluteX_ClickA
LocOK`
AbsoluteY_Click
InputBoYA
AbsoluteZ_Click
RelativeZ_Click
RelativeX_Click
RelativeY_Click
TriangleOldX
TriangleOldY
TriangleOldZ
Pyramids;
iGraduate
ClueText_ChangeY
EditCopy_Click
dfArcSinS
ThreeDXForm
ViewPX
ViewPY
ViewPZ:
WinPX
WinPY
WinPZ
SPZT
MapToWindow
Form_Unload
Cancel
Start
Finish|
Interval
Timer1p @
SpinningCube
iSCNume @
SCCheck_Click
SCCheck
SpinCube
3D CyberSpace viewer from...
Ivory Tower Software
Richard Wagner
CIS 76427,2611
Copyright 1992, all rights reserved.
You may use this VB source code in your programs if you include attribution in yourr
startup and "about" screens in the form: "Portions of this program copyright byt
Ivory Tower Software, used with permission," or a similar phrase..
If you do use this source code in your application, please let us know. We would like to
take a look at it. Your comments and suggestions for improving this software are
welcome.
Carriage return linefeed combination
View direction, vertical axis, single floating point
View direction, horizontal axiss
Previous LR angle in degrees, integero
Previous UD angle in degrees
Mouse down X for PicView double click eventi
Mouse down Y for PicView double click event
ExitButton_Click
Form_Load
left = 0
Azimuth = 0
Inclination = 0
Welcome to cyberspace. Some pyramids are straight ahead.
Use the vertical scroll bar to the right of the viewport"
to move forward.
Form_Paint
PanLRScroll_Change
Azimuth = "
Convert single-precision parameters to double precision for call to DLL:
Convert back to single precision:
PanUDScroll_Change
Inclination = "
Convert single-precision parameters to double precision for call to DLL:
Convert back to single precision:
BackForScroll_Change
On Error GoTo BFScrollHandlerl
X = "
####0"
Y = "
####0"
Z = "
####0"
Error in BackForScroll:
DefineAllObjects
Each object in cyberspace is defined by:
Object Numberu
Object Typee
Center X
Center Y
Center Z
qbcolor
sfSize Factor
iNumObjects = total number of objects in cyberspacea
The big red cube
A cluster of 100 random points
A tall white structure
Mysterious solids in cyberspace
An animated wireframe object
MakeObjects
Make prototype objects.t
Coordinates are in object space. Center objects about 0,0,0 in object space.
Object sfSizes, locations and iColors are assigned in DefineAllObjects.
The nominal size of an object is 100 CLUs in its major dimension.l
These object-primitives are defined about 0, 0, 0 in their own object-spaces.
They are later translated to cyberspace as needed, each being called by itsi
object type:
Object type 0, Point:
Object type 1, Wireframe Cube:
Vertex 1:p
Vertex 2:
Vertex 3:
Vertex 4:
Vertex 5:
Vertex 6:
Vertex 7:
Vertex 8:
Object type 13, Filled Square in XY planea
Object type 14, Filled Square YZ
Object type 15, Filled Square XZ
Object type 16, Filled Tall Rectangle (80 x 100) in XY plane
Object type 17, Filled Tall Rectangle (80 x 100) in YZp
Object type 18, Filled Tall Rectangle (60 x 100) in XY plane
Object type 19, Filled Tall Rectangle (60 x 100) in YZp
Object type 22, Filled Pyramid Facet +X, +Z (shift center -x, -z))
Object type 23, Filled Pyramid Facet -X, +Z (shift center +x, -z
Object type 24, Filled Pyramid Facet -X, -Z
Object type 25, Filled Pyramid Facet +X, -Z
Object type 26, Filled Diamond XZ (pyramid base)
Object type 43, Globular Cluster:
Object type 44, Spinning Wireframe Cube:
Vertex 1:p
Vertex 2:
Vertex 3:
Vertex 4:
Vertex 5:
Vertex 6:
Vertex 7:
Vertex 8:
LocationModes
Depending on where you are in cyberspace, different events can occur...n
Big Red Cube:
The big red cube is rumored to contain a fabulous wealth
of software and data.
Entry to this space is prohibited.
Ivory Tower:
The tall white structure is one of the largest objects
in cyberspace, measuring 3000 CLUs high."
Entry to this space is prohibited.
Pyramids:
The two pyramids are rather small structures in cyberspace,"
the taller one being only 50 CLUs high.
No one has ever been able to enter them, so no one knows what's
inside them, or who they belong to.
Entry to this space is prohibited.
ViewPic_MouseDown
BigRedCube
This sub defines the object-primitives for the Big Red Cube in cyberspace.
Each object is defined in its own object-space centered on 0, 0, 0.0
A nominal object in has a size of 100 cyberspace linear units (CLUs).L
The cube is an assemblage of filled squares, each 10 times bigger than nominal.
Filled Square XY
Fill color, edges will be black,
10 times nominal
FileExit_Click
HelpAbout_Click
CyberSpace Cruiser demo version 1.09, July 17, 1992"
Copyright 1992 by Ivory Tower Software, all rights reserved.
Cyberspace is a real cartesian space of infinite extent, and
was first described in the novels of William Gibson."
Now Ivory Tower's CyberSpace Cruiser lets any Microsoft Windows computer"
msg$ = msg$ + " user 'jack in' to cyberspace. A fast machine is highly recommended." + crlf + crlf
This program is freeware. You may copy it freely and anyone may run it at"
no cost on any machine.
Your comments and suggestions are welcome. Contact Ivory Tower Software"
via CompuServe mail 76427,2611.
About CyberSpace Cruiser
ViewFine_Click
Use the fine position controls to move to an exact point in cyberspace."
The '+1' button will move you forward one Cyberspace Linear
Unit (CLU). The '-1' button will move you backward one CLU.
PlusButton_Click
MinusButton_Click
HelpUsing_Click
CyberSpace Cruiser allows a human being to view and maneuver through cyberspace.
The viewport gives a 51 degree view angle forward. The scrollbar"
to the right of the viewport moves the user's view point forward and"
backward through cyberspace. Move the thumb button up to go forward."
Each click on the scroll arrow moves the view point 10 cyberspace linear"
units (CLUs). Each click in the scrollbar itself moves the view point 100
CLUs. The user's position in cyberspace is displayed at all times just"
below the 'Exit' button."
The scrollbar at the botton of the viewport controls the user's
view azimuth (pans left and right) and the scrollbar to the left of the
viewport controls the user's view inclination (pans up and down). The
view angles move in one and ten degree increments."
To travel in cyberspace, adjust the view direction until the destination"
point is near the center of the viewport. Then move forward until the
point is reached.
'CyberSpace Cruiser' is a trademark of Ivory Tower Software."
Using CyberSpace Cruiser
YellowCluster
Globular cluster
QBcolor
IvoryTower
0b \
This sub creates the white tower object-set:
Base Cube:
Filled Square XY
Filled Square XY
Filled Square YZ
Filled Square YZ
Filled Square XZ
Filled Square XZ
Second story:r
Tall Rectangle XY
Tall Rectangle XY
Tall Rectangle YZ
Tall Rectangle YZ
Filled Square XZ
Third story:
Tall Rectangle XY
Tall Rectangle XY
Tall Rectangle YZ
Tall Rectangle YZ
Filled Square XZ
ViewAboutFace_Click
Use the 'About Face' button to rotate to look behind you."
AFButton_Click
ViewPic_DblClick
HelpViewport_Click
The viewport is the large square region of the CyberSpace Cruiser window
and provides your view into cyberspace. The viewport gives a viewing
angle of 51 degrees both horizontally and vertically. The viewing
direction is controlled with the horizontal scroll bar below"
the viewport and with the vertical scroll bar to the left of the"
viewport.
If you double click on any point on the viewport, your
view direction will automatically be adjusted to bring that point
into the center of the viewport."
The Viewport
AbsoluteX_Click
What is the X coordinate to jump to:
Absolute X Coordinate"
Trying to jump to a forbidden zone
X = "
####0"
AbsoluteY_Click
What is the Y coordinate to jump to:
Absolute Y Coordinate"
Trying to jump to a forbidden zone
Y = "
####0"
AbsoluteZ_Click
What is the Z coordinate to jump to:
Absolute Z Coordinate"
Trying to jump to a forbidden zone
Z = "
####0"
RelativeZ_Click
What is the Z distance to jump:"
Relative Z Coordinate"
Trying to jump to a forbidden zone
Z = "
####0"
RelativeX_Click
What is the X distance to jump:"
Relative X Coordinate"
Trying to jump to a forbidden zone
X = "
####0"
RelativeY_Click
What is the Y distance to jump:"
Relative Y Coordinate"
Trying to jump to a forbidden zone
Y = "
####0"
Pyramids
This sub defines the pyramids as aggregates of filled triangles and squares:
First Pyramid:
Triangle +X, +Z
Fill color, edges will be blackY
Triangle -X, +Z
Fill color, edges will be blackY
Triangle -X, -Z
Fill color, edges will be blackY
Triangle +X, -Z
Fill color, edges will be blackY
Pyramid base
set below the apex
Fill color, edges will be blackY
Second Pyramid:l
Triangle +X, +Zd
Fill color, edges will be blackY
ffffff
Triangle -X, +Z
Fill color, edges will be blackY
ffffff
Triangle -X, -Z
Fill color, edges will be blackY
ffffff
Triangle +X, -Z
Fill color, edges will be blackY
ffffff
Pyramid base
set below the apex
Fill color, edges will be blacko
ffffff
Form_Unload
This is necessary in this program: applications with multiple forms need to
have "end" in the Unload procedure of their main forms. This gets around a VB
bug which can either leave orphan hidden forms in memory, or crash Windows
if you try to exit windows and unload forms from the main form on Windows close.
SpinningCube
WireFrame Cube
Spinning Cube object number for location change in Timer event:
SCCheck_Click