You are on page 1of 36
PCVR Virtual Reality and the IBM Personal Computer Creating a Better Virtual Hand A Virtual Handshake PC VR Board Contents Preface The mentality of it all! Creating a Better Virtual Hand Page 2 ‘The Virtual Hand program is expanded to a full three-dimensional hand. A Virtual HandShake Think of it. Being able to shake hands with a person anywhere in the world! Using two PC's, two PowerGloves, and Watt TCP/IP, and two Virtual Hands its now possible. A PCVR Board 23 Using information from the net and other places, several printed circuit boards have been produced that give the PC a fighting change at VR. Graphics - Basics 29 We begin an exploration of the world of 3D graphics. Next Month ‘What will be in the next issue. 35 PCVR PCVR is a publication of VRing Software Development. Published by: Gradecki Publishing 1706 Sherman Hill Rd #A Laramie,WY 82070 Refer to the back page for required format of submissions and address. Since the publication is basically free, we can only offer circulation as an incentive for sending ina submission. ‘The only way we are going to get VR off the ground is for everyone to pitch in. PCVR is a bi-monthly publication of Gradecki Publishing. Copyright © 1992. All rights oscrved. Gradecki Publishing accepts ao liahility for any consequences of is use, and no ty for any errors that may Publisher: Joseph D. Gradecki Editor: Waverly R. Gradecki Equipment: 80386 IBM Compatible HP LaserJet IHP Windows 3.1 Word For Windows Corel Draw Preface Joseph D. Gradecki Over the last few months, I have been amazed at the response people have when they hear about Virtual Reality. They were mixed views. Most people think that the technology necessary for VR will never become a reality itself. They seem to think that people ten years ago never thought about a recording median that was not based on the magnetic tape. But now we have CD's. To entice them, 1 present a question to them. I, asa VR designer, have created a bungee jumping experience. You feel the sensation of falling, see the sky and ground, and feel the cord snap you back up into the air against gravity. Now in the middle of the jump, I cut the cord. As you fall to the ground, there is no snap and you see yourself hit the ground. You feel a thump sensation on your body. You hear the screams of bystanders. The question is: Will you die? Recall that your mind has SEEN you hit the ground. Your mind has felt a thump sensation as if you indeed hit the ground, The usual response to this question is NO, you will not die because we will never be able to present the experience in enough detail and realism. The brain will be able to figure out that it is not reality. Technology will allow the realism at some point considering the history of computing. Half of the negative responses change their mind. Think about it. This is one of the consequences of Virtual Reality that will need to be addressed. This technology can be used for destruction. What about the psychological terror and torture that a person could be put through? Would the military need drugs for torture or just Virtual Reality? On a Lighter Note I spent the last few weeks researching what it would take for a true Virtual Reality system for the PC and came up with the following Ethernet The right and left PC's would be responsible for graphic calculations and display of the appropriate image in the Head Mounted Display. The HMD would consist of two color or B&W TV screens. The center PC would be in charge of. A) Generating sound through a soundblaster or appropriate hardware B) Monitoring the Powerglove which is using the 6811 microcontroller ©) Monitoring a treadmill for walking D) Monitoring an image grabber for head movement The three machines would be interconnected through an ethernet local area network. The system would use control software in order to coordinate the activities of all three machines. This is the current system which I intend to build. T would like to get some idea as to what you think should be included in a moderately priced PC Virtual Reality system. Ifyou have any suggestions or comments let me know. The most important part of the system will be the graphics software and at this time I am not concentrating in this area because others such as Dave Stampe and his REND386 package are maturing at an acceptable rate. Sometime in April, Dave will be releasing a new version of REND386 so look for it on sunee.waterloo.edu. Others In the first issue, I tried to describe some of the graphics code available to us. There is an additional package and series available. Michael Abrash is presenting a complete object-oriented 3D graphics package based on the 320 x 240 graphics mode of the VGA. As in most series, more code is added each month. Mr. Abrash confesses to being a performance person therefore much of the code is in assembly language; line draws, 32-bit math using 386 instructions, matrix multiplication, and fixed point arithmetic. The demonstration programs are impressive and are getting faster and better each month. I highly recommend checking this series out. This series is appearing in Dr. Dobbs magazine The code can be obtained from the Dr. Dobbs forum on Compuserve under the name sharp.arc. Or from WU archives at 128.252.135.4 under mirrors/msdos/ddjmag/sharp15.zip. All that is asked is a small donation to a charity that Mr. Abrash mentions in the articles. Check it out! And Lastly.. The United States Army recently paid $1.5 million for a single battle in the Gulf War to be converted to a graphic form. The pictures that CNN displayed showed a slow moving blocky world ‘An interview with a commander in the Army who was at the original battle said that the conversion was so realistic that his senses instantaneously sharpened and he felt like he was at the battle. Need I say more? Just imagine if a commander or anyone could be present in the graphics world and manipulate their surroundings. Next Issue In the next issue, we will be concentrating on Head Mounted Displays, The interface circuit, design, and code for the Sega glasses will be given and any discussions on ways that PC experimenters in VR can build a HMD. The HMD is one of the most important aspects in a VR system. The aphics column will continue with a discussion on matrix transformations. Creating a Better Virtual Hand Joseph D. Gradecki In the previous issue, a program that executes the Virtual Hand was described. In that program, the Virtual Hand was just a stick representation. In order to bend the fingers of this hand, the actual points that make up the finger had to be changed. The following is a description of a true 3D representation of the Virtual Hand, Stick In representing the stick hand, the objects that made up the hand were very primitive. ‘The palm was simple a box, and each finger was made up on three lines and four vertices. The entire hand had twenty vertices. This worked well except for gripping. In its normal orientation, the hand looked like this: Front When the hand is gripped, the finger should move to the left of the hand and make a grip. Using the normal rotation routines in the graphics code will produce the following figure. Notice that the fingers are no longer in the proper orientation, If you grip your right hand, you will see that the first segment of your finger should be horizontal, as the Virtual Hand shows. The second segment should join the first and be vertical, it is actually 180 degrees from its original position and translated to the end of the first segment. ‘The third segment should join the second and be horizontal with a move of a 90 degree rotation and a translation, You will see from the picture that when only the rotation is performed, the segments do not join as they should. If the translations are performed on the joints as well, the segments will join up. These translations are specific to the gripping of the hand. They must be figured out through either trial and error or using graph paper and a little math 7A When the translations are performed during the grip, the must be undone when the hand is flexed. If by some chance, the hand is rolled to a different position, the translations will be wrong. In the case of the second version of the Virtual Hand, this was solved by keeping a constant record of which position the hand was in so that specific translations and rotations could be used. The original Virtual Hand was so sticky that it was easier to change the points of the finger object than perform the rotations and translations. 3D Virtual Hand The new Virtual Hand is not a simple object. The palm consists of eight vertices. Each finger has three segments with a total of sixteen vertices, with a grand total of seventy-two vertices. The complexity of the new hand (and my total lack of artistic talent), makes it impossible for me to reproduce the hand for you here. It is still blocky but it looks more like a hand. ‘The added complexity of the hand meant that the grip would have to be handled differently. We can no longer simply change the coordinates of the fingers since they have a total of sixty-four points. To solve this problem, a little learning was done on my part. Instead of trying to rotate and translate the fingers as a single unit, I broke the fingers down into the three natural segments of a real finger. As the hand is gripped, the segments are rotated, translated, and redrawn from the lower segment to the higher segment. Each of the segments are translated to the origin, rotated to the appropriate degree position and translated back to their new position. To do this, there is a new function called mini_proj This function will return the new location of a single point. I give a point on the end of the segment that 1 want to attach the new segment. The values returned are the translate values that I use for the new segment. For fast reference, the values of the joints are kept in constants. The new Virtual Hand code follows. ar ae pany Ving Sawa Dove Ay some we ame probed ese permission 8 este ation fd ado h> cade pepe > ‘esd ah > fade ce > ‘cal oe osha ovek> sce x= 540, cen ya 2a, latasevtvastiss sty pot ( tym St Sey, St sea Povcty Ft et: Tis ste define te ow pinta ae pe poyzon ‘eee poten set plign( setpoint “pons net st ers set obit art payen pags, ae amber) seta it sei ent (struct matic) Cai far oacaios) ( orgeogetie) wom 08.) ) momo) = 10 om] =10 meal} =10 momisya}=10, seid et view waneirmaond (tes sit crt ei stashed); 12 opti—omighto dey, 1° weeomhaa, Poe oath vee sgt osbeaenghi, 0") seb sapt, (0°) taj crate bet (strut bet ab) (Cos arate pratact Oe chpoplyons= MULL coponunber = rehab, ade pe ETO c sre plyon Suc. pot *, (obiomunber>0) Teaco = NULL) p= bypates, Sb Spans 0) polgonsovet ‘tle oper NULL) in opens ppv, ‘eh ) ex 1) seem. n ‘et polygon a gyn (set bet ab tt pbygon “int ine) {Cp=teeet ppg ods pon). io. >ptpons = NULL) ( peaen) tet ob paljeons ppoyaee he) iota nt os (sts nyo int i (Cot anja 8 9% 2 seat atta) 1 pop caren Mat a) *) Boma el eoyematn 0) + Pert] atom ytepoxtmatomyot pope t+ Poet ety se povtnt m+ pyre + Poeoat mala et went yey avert seein Benita ry eo Sexnsctuandt nee , id min (sty po pit int yn a, beta at) Care yeas mH YO 1 apply cre ba Mae oa) */ Coenen Snel « ropa] © Peer I0)= ‘mam sey pontmat lt» pope Povmatm() + ‘oxen seep otmat>mioe)+ opel t+ poematm1al ‘naomi i a ST OAR TE a IT (Cemetpatigon "psa yp Wb yd 29. 9 my aero: seed aay, a2 Axd; 92-492, oben, Stade IENULL) “d= pps, posed sim se seul yi se" aedoneet xe yoy, ) depot —0) Ue (sce scm 2. xd eee yn), ) prponet > id eres sts jet ob) {Cit pajgon “pst pont 4 sel BLACK Pa sbiopebans, file(p NULL) ¢ Mepopani xsme=dow yada whie(aeNULL) ecto seen, sen ous en yey yoeay ) Hepotme 0) line sce x2 seen yy ste, x2 sen) ) popotet ) ) eid avers plyon “pit it.) seus post "en tan = Pes ep NULL) ¢ whl tmpnext = NULL) (tmp = terpenes) ) = (onet my pit tol ineafebat my po) ekg dye eens soir delay, dale, nee NUL, tepopsin= NULL) (papain =A) se ("temponent~ ) Sut et mae han objet (st objet and) {sot bon hander, ot and): saponin 0), ae 10,00) ‘i veep... Piven 7010.80), peep 4000300), 1 nd polygon hand) ave (#90 1000) UL ver #5010, 100); ree 45910, 0) arene 89,030), ad plyon hand: ye 00-0, 1080) a peo 0.01080), pea pigon nd 9, ee 0, 8,30 a hee 0,3 ad pon Cad. et 1000.30), a eto 100,30) tum (ha) , set objet“ ke fnger_ tet (svt jet) (Coote 7 {orto (O 1 pat plaen eri 9 0402108. eri (0 02100 {SA ee (80401500 er 2001600. 7 Ft sng of ge 08 ‘padi gyn £9.03, i ete p30, 1300 Si ete. $0, 100. ‘veer 038,100. pee (60, 38,1310), 1 Fs see of ge ack {eter (80,30, 1000 peat pon’. 1), yer (10,30 120), aye (BA 0100), paid pon 9.1), a pee (5.0 8100) a pene (At 38,100), rerun 0 : ‘eee * hg oj actos“) (Cs payon Pree bet: Seon sept fag on» ‘vad pogen( 9.0). i eon (a, 1500) Sein 0, 01300), a ee 308130, Se ex (0, 30,150), Seon eget ges“ ‘prada pobaon(Cp.0). ve (p40, 0 1500), {seen (p80, 20,1300), een (503,130), een (88036, 1900), ines osc sent“ ‘pod gen 1). a Rae HagaTE eR TT {suc pobaon aerate et Treen of ge Son" p= ai py (60.0), ee (0 1660), Se 0 8,150), Sa perienA,38, 1500) aden (p03, 100), Tid semen igre! =a peg (0.0), ioe (80, 120), Serie 450, 88,1500) hee (P8038, 1500) een (p50. 38, 10), (indo idee" poadd pahgon( Gp 1) ein (a0, 40,100) ‘eto (990, 0,0. ead. seven ft a er (9 10,30, 160); “eter (9.450, 30, 100), een st et mae finger. objet (stat bjt *1 Pa ero (0.2, 130) 1 agent of gt uc") edd poyzon (E60) een (p80 85,100), dee p80 285, 1000) vere (50.28, 1000) a vee 80.2, 1300), ne or ost segment 7 oad paypon Gp.) een (pa, 2,380) eee (p80, 28100, sad polygon (0.1) ein (p40, 28, 100 ree (480 208, 1000) ttn emt to. sites tpc em Ea : deat me eta (sant 1 Second spoon of finger ont * ead pon.) ee 28, 150), ere (028.1380), a eri (na. 228, 1380), yee (70.228, 1500. 1 Second seen of finger ak" seat soe seen nas 0, it oot p03 a dye (A028, 100. pee (40,728,150. Lines for son segment“) ead pyc ver 0,385,150, dye 480 24,1500), Prada pln Ep. Nae (7a 2 (500) ree (48022, 1509. rene) “ae aaa aga VR a ORI (Ses ptyen Fro, tet (1), Thi eget of geo"! posi pobaon £0). ei (0285, 160, ere (0.285150, {yee (022, 150}, ete (0, 22,160), peep 0,280) po aa pogen 69.1 re (9 0 28,100) arene 89,28 0) ren , set objet * ake finger objet (sine bet *) (Coretta feroe, tet(, tage of get ot p=edd pobam(C.0). ex (0 1300, ‘a eon (0 11H 100. eee (0, 11100), een (0,11 130, (Fe sop of gece poeda gebn 9.0), ete (8 130), rere p 7, 100) een (880111000). ‘ever (80,1, 30) (ine rts */ reten( 0 frtojo* mike Singer eject (eet bet *f) (Capen cet, bet (1: ss, ‘vee 450,11, 1300) st ee "ake eget (st objec °F) Cet ptyon y eee et Thieme fag ont*/ een 7.0. 1,150 a nee 0,116,160 ‘ven pes 1) 2 inde for hd spent */ i posen ‘vere, 80, 171,160), pos polygon (C9. 1), ‘svete, 118,180, (vee (80,14 1600) oun ? Scoot * make geojnt (tt objet *1) ‘Couto (orate eet (7 Festsegmat of ge = ont *! ‘pod papgon(C9.0). {yee (0, 71300). ‘a ven (9.8, 7100, ‘Byte. 0,300, 1 Fast sopment of ge buck */ ‘pod papeon E90), (5 ven 80,7100, ‘ven (300 00 vee. 0.1309, Lert eget“ i poten. {pene (8, 0.1000, Pas pono (60.1% {Nl vn (0, 0.1300, (dyer (850, 0.1300), Sa ojo mabe_eyert?_objct sae objet *f) {soot vgon (erate et 7 Seon nent eget Soa! ea paggon (0.0). i etn (pa, 7150, 2 vate. 7 100, 1 ete (000,130, yen (000,150, 1 Seond sagen of ger ck ‘=a pogon C9.) {i ee (31.180), 2a ote (N59, 57 130), ‘Sd yee (00,1300), 5 von 45,0150. 7s con ane oe Ea 300 coe “make ge obec (setae *E) (Cotten Fee bet (1), Th eget fg ont*/ a pegon 0), esi (p57, 100), a ee 057, 1500. a ee 480,300, as een 10. Thee of age ack) pad goon 7.0), est (8S, 1900 a et 8857, 15007 i eon (94500150, ete, 160), Ls td sept apoyo. eo 108,160 eon 8,9, 150), ee 489,100 etm (P Y stmt * mane (set matic tat") (Got Mate, set ae (orc atin eco rc ai) Forgeosctiey ( feromaycaive) Ferneoscaaie et emi om ) combiil=t: 3) amc rca jo alae a ma at ey) (Coosa 6 ‘veto na lesan nat), sient, ‘means, ‘bomiai| tans. Sane fer) He, sen) p Trane yee sae (ST ew HEY (sect (ste mati ett mt, entity m0] see mill see, oma] see il: ‘etna. ee retun(e) Y ct abject (src nat mat, os det) ‘ ot tec hein ‘uta hens co (det. ‘hes = 5 (aes. PStemet matt rotate mat), entity, emt} tos, ‘omil2} tes. tem) shen pom) eon = matoonal (mab) teem Beeb), em(6) h stot main * tet yot (act ma at fat eg) (teat cs sn sects." hens co det ins), Shen (eget as) (ore ma oto mati), sey. emo) ton, bem =the, ‘bom = dee ‘bom dees, ‘tmnt rat) feet), Bee). eure), : ‘vet mito mo art mae a at eg) t oat cs hes cuca, heat code.) en =a deg ars) bb tGructm alotizofuct mati), dey, loo] ts, ‘om, m0 tenn, om} tos arm), ‘eet ee penton eid and Caare ‘aptnade, paper ny. est pt jae to, jie: ft gmt povey-0, wee, wef dose charge, ste objet “hand ng tage. fger. ge ge 2. ng 2a 2g hg eng S, singed fags. tt mie ait, Eger “ge? mati, ingame {ve sao, = y= TTT ‘Pico 150; sey 00; ano ico wey = oe ae; papeote= VGA: paphder= VGA: ipaph (Aaphier, rptnoe,"e") andra = (tact ain palo mat) gee" act at alt sarosave MO), nga nat = Geta alto mat), fing ote “lool mati) tet (hans) ey ge nic), en Sg me) ety (Ege, at) ov i (HIRES. NULL, rm "Exe he gove a ten Pes any ey") a: 5 wae AT c le coe ey) vee, ove eon ieqgovxte gover) ( ‘dinge =. ieGgorx> sores) =the gone) "25, x= sbaigorsgioven "38, sover=povns teovy powey) ‘ange 2 Megby gover) eto yay) 25, y= bovine) 28 povey =a. 1 (gorzt adver) ¢ sharge= 2 igors? power) Fe dip 2gvet)* 208, 2 igo ges) "200, sloveowa. it(etange=2) ad. mat = bjt esl (hand i xy), noth mae ject went grab X92 feng = best at Sger? ma 9 fingers Fger at X92), , he ee (eaege— 2) ‘ee bet (and), ee objec Siget ue stet(Gged see je Se) freee! get) rej fr, 2) ‘hoe byt nga 3) ese bjt (ged 9 fice bet get 2), Sst ge 3) se bel (ge 3), Sse bt (ge) oe bet, ‘aree= Is) i giovteye Box) OAD) ( eho'gs ) ‘Forge & Ont) = 980) 8A ese = 1) ( aj one ay, ge sot), {reehmane=ps tea(eger fa -, Mloveot™ 1) (ers a ga ager_matix = bjt ot (Sge_maic 9), eg saa~ ojo Sait (ga 97) rn _o (Ajit toy, 2 germ): ‘eget ~ bjt (ger a.) gover 1) Terni objet ot (ge mai 10), See m= ar i. 288 ce Eiger mic ~ bjt ot (gettin 180); teem gma 8 2, ‘ej. ue, Ay. A, geri), ‘gest utc ts geri, Mego 1) agers mee objet rol ges mat; emi ge a 828 te re nic bet (get 9) rge mu= eject bese Enger. 929020750), Soe) ican & Oxf) > O48 (cise —=0)) (Ogi po toe, 88, get: Seger ae = cj Ouse fg. a: opine (Eee cet yt fac 9) aa po Epa ee TT ‘rg mut cet bt fig a, 9.) (poet!) eget maix~ objet yo Engr me, 20), Sem 28, fet “grax bet ro Siger_ mati, 180) See m= ee ge a8, Ii yj ( Ain, te, by ge tin) ingest mac bet tate (ge aN). 2 Moe =1) ge matic objet pot Sige. mat 0) Seema tg a 8 0) the Engr) mace oop at 90), fae. mans obet ae Sged a -20, 2.780), yet) €ghrrt>—3) a& Gave 10) Ba (aovrt —0) (Chant polos ps 4. 42. handai), ‘tpn. mance frsbige. ma. 92% ‘oreal= gon s0t<2) a8 (glovdm= 1) ‘dover ‘Rn (han plyone-pois sy, har tic, and mat bjt ete os 2 1 ‘nd mabe ae hand a 90), ‘and mat bet ate al at. 2). A Virtual Handshake Joseph D. Gradecki The PowerGlove is one of the most essential parts of any homebrew Virtual Reality system. Although this peripheral device does not have the accuracy of the DataGlove, it does not cost $15,000 Afeer the Virtual Hand programs were written, I needed something useful for the Virtual Hand. The VR HandShake was born. I wanted to simulate a handshake between two people using the PowerGlove. The only thing that was lacking was the communication. Having built a network parallel processing environment, I had at my disposal the network components that was needed. As I thought about the handshake more, it occurred to me that the program should be able to interface two people from anywhere in the world and my networking toolkit was for local use only. What I needed was a TCP/IP package that could send information anywhere in the world. After looking at several commercial products and determining that they were too expensive, I came upon WATTCP. WATTCP is a public domain TCP/IP package available from sunee.waterloo.edu This package is outstanding and works as advertised. With this package, we now have the Virtual Handshake. Specifications The program requires the following: * Two IBM PC's connected on Internet * Two Powergloves - one at each site * This program Each of the PC’s must have an IP address which the local gateway will recognize. The program uses the VGA mode of the PC. The Powerglove is accessed through the parallel port. The program has been tested on two local machines on the Internet and everything worked fine. The delay for the remote glove was minimal due to the close proximity for the local test. Setup We will begin by explaining how to use the program. Each of the PC's must have a file called wattep.cfg in the local directory. This configuration file looks something like this amy ip-129.72.6.112 + ipaddress ofthis machine rnotmask=255255.0.0, netmask for Foal network fameserver-I29.72.12 adres ofa name server {adress of your gateway {system extension Each of the values in this file must be changed to reflect the addresses of your network. Once this is done, you can begin the program. One of the machines must be the host and the other the caller. The host machine should simply execute the handshake program by typing shake. The other person will need to have the address of the host machine. They will execute the handshake program by typing shake xxx.xxx.xxx.xxx,with the xxx replaced by the ip address. Once a connection is made, the host machine will prompt to hit any key. ARer this key is pressed, each machine displays a statement instructing each person to exercise the glove and press any key. ‘After both people have pressed keys, two virtual hands will appear on the screen, The red hand is the local hand representation and the blue hand is the remote representation. As each of the powergloves are moved, the corresponding virtual hand will be moved. This will not be in realtime, unless the machines are relatively close. Shake To produce the actual handshake, each of the virtual hands must be equal on the Y axis ( vertical ) and within an inch on the X axis ( horizontal ). The Z axis turned out to be more of a problem and for this version is ignored, Once the virtual hands are in the above positions, each of the persons should grip their powerglove. If everything goes as described, the program will take over and move the virtual hands up and down in a shaking pattern. It may seem childish but works. To end the program, press the q key. The internet connection will be closed automatically Operation The basic operation of the handshake program relies on the virtual hand programs. The graphic manipulation routines are the same. The difference lies in the communication between the remote and local machines. When the local powerglove is moved, two things must happen. 1) the virtual hand on the local screen must be moved, 2) the remote virtual hand must be moved. The first step involves the standard operations from the virtual hand programs. To accomplish the second step, a data structure was created and sent to the remote machine, This data structure is called remote_glove_data. struct remote_glove_data { int x, y, z, roll, grip, angle, horizontal; char ch; i When the local glove is moved, the new x, y, and z values are put into this structure. If the glove is gripped or rolled, each of these movements are recorded in the structure. After all of the new information is collected about the local glove, this data is sent to the remote machine, A new hand is then redrawn on the local and remote machines. The information is sent before the new hand is redrawn, therefore the remote redraw will occur within a short delay of the local redraw. The remote machine receives the new data and redraws the remote hand if needed, Because each user sends a large amount of information, the redraws will be slower than the normal virtual hand program Tests ‘As mentioned above, the program has been tested on local machines. I would be interested in any experiments using machines at long distances. This would show both the feasibility and limitations of a Virtual Net. ‘Compiling In order to compile the handshake program, you will need the powerglove code described in the last issue and the wattcp package from sunee.waterloo.edu. The wattcp package includes two library files called wattcpsm.lib and wattcplg.lib. There is also a header file called tep.h. The handshake program will use the wattcpsm lib. The following explanation uses Borland C 2.0. I have not compiled the program using Turbo C nor Borland C 3.0. The simplest way to compile the program is to set up a project file with shake.c, wattcpsm.lib and glove.obj as the three components to the project. Set the model size to small, Enter the optimization section of the options and make sure that the register variables are turned off. Apparently the wattcp package does not like having its variable put into register because the system will not work with that particular optimization. The program should compile and run effortlessly Software The entire source code to the program has been printed in this issue. We will always do this, If you do not want to type in the program, check The Last Page for other options. The handshake code uses various pieces of the virtual hand program. While some things are the same, others are different. In the coming months, we will develop a graphics library and the amount of code published should decrease. Additional This is, to my knowledge, the first piece of useful code for the PowerGlove and the PC. I am aware of some other uses of the PowerGlove on other machines. There are several additional programs that need written, 1 would challenge anyone to write code for the PowerGlove and the PC. The graphics code that you use is not a big deal. Over the next month or so when the new release of REND386 is available, I will be rewriting the virtual hand and handshake to use this package. I did not use it initially because the objects could not be move in the world, only the viewpoint. I would like to see the following programs written at some point. I fully believe we have the tools available now. * A Virtual Pong or Racquetball type game. * A Virtual World manipulation. Have a sphere or polygon out in a world that can be picked up and moved. * A Virtual adventure game. While they may be trivial to the Virtual Reality circle, however on the PC I have not seen anything that comes close to them. Since the REND386 package is particularly fast, these programs could be written to take advantage of the Sega 3D glasses. More T would like to know of other programs that you would like to see implemented on the PC for Virtual Reality. Let's start getting some software out there! ‘Tasca aay Vig Satis Deepa 7T 5 Acoma ea pan Ppt heise." clot Selden Sele gps > ‘clade cath Schoen cde oat ete ph acide set PORT 23 Meteo mains 20178322 ‘etn 0 900 ‘tne e900 ‘ete ps 100 Bisse y2= 0, ivarhvestopahijoko fp Socks eet objet hand, “ines. fergeaiceies) ( frGenscten) smemiil=00. 9) m>mloel= 10, moaii]= 10, rmomaa|= 10, momIa}= 10, , sre jet "crm (staat “bd (ter oe manta ee et) obp>payns= NULL: ‘uponanber =. reten(, , idk cbs chest“) (Camera st my_pot t(objomeber>0) ( ‘thle popem NULL) apps opus p>poinsonet said ) ee 3) rion: stot py apy (setae st ‘jan pie) {ps ars pty tosses p00), ‘ponent WL Poponts = NULL: pete t¢obpoygons= NULL) ( Seber) eat ob polyeng erbieh exjomur ume) Fi at acta pe pit“ at (ne yt 98 8 ama 1 Apt caret aba Ma at) */ fat pewrmomTo] oye) + poet Se( maton pie poxtmatafo} evra + poem niat]* mami, t= poxtmat nfo ‘poyrmatmt + poemrnlzia © mona) eat yey I ewbeyeth oN tenth mgr yaw eps amet, pipet. Tint aare sez, yma, 1 Aly rant bl Mai al) */ cep ates oyrmat e+ peemate 0] * ‘mae ponte m+ ‘eam armani) + pope Poemaromlaals ‘>I iets bjt “0, sou ma “ma ‘sion (Cea pigon p. ‘ty po" Iota yay on 9, 20. 2. seta ok oyna, aaa, say = objonotgon: Se(pIeNULl) ( a= pein, rosa s,m) Bas doa cer vee (4 NULL) sda y2, a), Forside wa poate orem"! foo Ie eon x sren yy, sen 2-82, seen 92-92) 7 Saves pot are"! a= dome Sn yey, » Hcpotwe=0) ae (stn 2 stan sen a, scm yay Popov )) idea bjt tet obj "ay {Cémetpalon "pct ny pout stor BLACK. pens Iiide(pSNELL) ¢ pei, oy Sane, wwideCeNUL) he (Str 2 seen, seen soem yo om ane, ) Mpoim—oy eet 92 sen nhs 9 rents ida een ana pan BTC TY (Comet post np sepcoti GeypNULL) ‘whl tempt» NULL) emp Semper) p (ast ny, pot yaoi mys teenie doyy, does meee NULL ie(p>pine = NULL) sot “meando Cet pbe bs a sygon hand. 0, ire 008. dpe (7 040.100, pre (7 1040.30 Padre (74900300) =a ptygon tac 0) ee (40.0, 10) a er (850, 0,100) ‘vere 450, 0,300) tee (8500.30) ad pygon (had 9,1) 70,81) p=. poygon hand.) pee 10 100,100) Saree 50 40,100 Psa plygn hf). vee 0 40,30, Pye (45040, 50} i polygon han. hee 00,030). ape (1500.30, etm hand ) Pe objet * ake Sgerl_objot) (at abe Fee oct Ret segment of geet") ‘aad potygon (C9. 0) Ea ee (pa 0,130 ee p00, 10. semen 3 00) Sete, 38, 00) 1 Fst sgment of ge -as* peat gaan C0 ‘at rec (pn on ad ene p03 0 itn p80. La 2 Line re scent“ eda plygon (C1) ere 06,150); a vero 85010, 300) pada polygon (9,1 ex p05, 1000) Sa ete. 3,100) ald payan (.1), steer p00) eam) aT wale ae OT (Sret paves sje fea be, paddy C.0) a este pa, 01500 A etc 40, 0 a etx (p03, 30, eto (p03, 15007 Second agent ger -tak*/ paead.paaon (0 enon (8, ‘vee 0, 13009 vee p80. 30, 1300 id vee (p40, 1590) (7 Les fr cond sognet*? ‘peal pope (E in (0. 0 100 1 veo p40, 1300 add poyn 1: et pa, 38,1300 eon (p00, 150) rete , et objet me Sages bet) (Cost eye seu et", sre, tet argent of ger oot” add pyro.) ye (a 0, 100 vein, 9,150): ee, 1500 a eax (009,160, Mid sean gerbe“ rade pegon( 6.0 set, 0,120, et 8040, 150. vet p50, 20,150 pete (p80 30, 160). ‘po od polmon EP), ‘ie, 0 1500) 1s yeep, 90, 0,160) odd paipgon tt ge (910.30 160) age (p48 30,160) rea , src ot be. ge bist) Cita Free, (Se the ft ppaedd pagan (E90). ete (0,38, 130), Sten p00. i eee, ("Fst spent get") ‘pod paeon EPO) ‘ye (450,285,100): Tepe p80, 28,1000 ve 4,28, 100) Sa ee 880.22, 130). Tie rat ped pveon(P1) ea eter (pe, 2,100 hd vate pa 281300 pada polygon (Cp, ert 0, 22, 00) a pee 80,2, 100) =a. poyuo (tp. erp, 2,150) {Sa ee (80.8, 0) ur pi src ojn eke ayer. bt Cian Fete ob (0; * Sexe soget of peo"! add pojuon (9. ‘uve (00, 285, 1300), 4 yee (0,2, 30. een p02, 800) ‘pond pao (69.1), Tea ene (pen 2 San sree p28 130) ane 450,228 1300). eve 80,298,150) poaad ply (1), a e028, 1500) et 450.285, 500) Pad pyuon (E.2) a et (pa, 2,150} tere ( p88. 50) sum (0% , stot make Sopa objet c 7 owt bet“ PM sent figs Goat"! rad pyro E00) etc (0 85,160 rent. 18150 etext, 22,1500 emer (pi. 28, 100) 1d segment of get) = i ply. id ene p80 28,1600) teers 19 SS anec (pn 28 to) nde tid eget */ end ply. ane 10265, 150 Sate 450285 1500) paid poygn (Cp), ad. vere (480,22, 160), ta me age IA i srt paygn Seiten Feces obj od plygon (Co. ree 14,1300) Ftc fgets"! posdd pve (Cy.0) eee (p80. 17, 130 ‘eon (850.71, 100) {een p50, 114,10 gee, 14, 30 ‘poe pvron (1) eter (pa 17,10 = poygon(p.1) a ner 1, 100), 4 ste pA0 11100 oad giygon Cp.) even (p00. 114, 1300), it eter p10) semen f stot make Figen (setpcben'e Fest bec (7 Second sen of geo“) ‘p=. payee COU Satter 7, 1500) ate (740,17, 13009 a fete 740,114 1300 / Secnd spent of age bk Pn pron (C0), eee at 150); Sipe 50 1300 tee At, 1141300) dpe (A811 150}. nes fe scond sepen* ‘pond pays (E91) i wre 00, 1500) dso 07,1500) polygon (1, re (111500), noe 8011150 renen( : et bec make Ege. obi) (Ses pgen seabed Frese sec: Pid agent of get Bot“ pe ply (0 ina 111500) vee 0,171,150) a pee 0,1 150) Pa pete 0,11 160) Third scone! of ger bask"? ped ply (0) ete pa 100) ex st 11150) fete pa 111500) tpt 1 7 Ts ar a 7 edge. ‘een (40 10, id pon 9.1 ia ee e010) avec) renen( H erecta ke get, objet (ine abe Foxe bet) Ret expen ogee asda pon 0). st een (130 at verex (na 61000) sven (8130. Fetsgaent of finger: ack */ pe add pian CP.0). set (8, 57,130), Seen 857,109 ‘seo (80600 sete. 610, Pie ist segment 7 ‘pred pvpon (C1 i ete (0,57 130), i eter (857,130), esd poygon( Ex. 1): i eee (0 si eren p01) es paygon(,1) i eee. 30) eee (p00 1300) ger bj) feexate bpat( (> Sced seget of age ot dd plon(n.0). 1 Send segment of ager tak */ Pei pgen 0). ave 050 5 130 Sweep, 1500) ives 57,10 Peo pean 9.1). er 0150, ae (88150, rean(, } rie te eget ote) (tpn f-cxese_op 0, Tat Tage FT paedd paveon(G., i ee (p., 37 0 4 wee 037,500) SAL pee 70,10 acre 04, 10) (Tid seme Se -tak ‘eres (pA, $7, 1600; ener (pst 371500 er B05, ape 808) Linde thi sap pr ada_pajaon (,) ein (0,57 eo a ee (8805710, d_poygon (tp) ein 00100 een 450,010), ear Y statis * maton sucka sata“ t = et mai ozs 0, tp) rgeascaaes) ( eee ey , comibd=t 9) renen(el ) scene bane (Ss a es ‘tay ea) ? , ‘Mm ate mai Sao} ems Smiles Sombie ee fect fee), stum() , Set mai * bjt se (st mai en owe) 1b (tet mat *alloe(szeofstuct at), ety) Sol see ‘om ssa Smal ste | feet) Y aD tot eos hens thes on (ago ras) tes ng as) Soest mane “alone mei) ii et], ‘eomal= ecm, Smt] =-Sesn, ome} eon ‘ina feet, ety ten(e: ) steel stm me a) stan, hace co (dep. rain) ‘hos in deeds), pS famet mans nates nti), sitet) eof} tacos, bmO}2)— thm, bom) = th, ‘pom ts, ‘mtn ma feta, feet. me) Hi seem esc Bot hs hs sect," i Huan Sng. = bt te gua 92% Anger. matic bet tie (geal 32) Sgr = beta (Enger 9), Seger. mate = ete Eger ma 92) in enn emote hand mat’ = bet taste serie hand a =) Tate fd ai ject erat ba atin 90 x rete fad main bet ase rete, a2) etn get ue ase sete, eget 2), ee reso rt etic ere ogee bjt ae ete ge 2 regent ate sete age ti 9.2). (pe et ee ge. mt ‘emote_finger?_matri~ ject tat ( remo rg? ae 2) Se fe tt ae = ee nai ot temo ge ts, eating, nt bjt ie veote ge. ae ).2) in pj smite and pyre point, hy. seote han ‘afd a = tet sae scot hand att 7.) erin ma bye yot(reote band v0) ete fund matin ote tie rete hun e92) ete ge sat = bjt ast a and = ae aR NTC cs og mu 5.0950 oid do state (Cera an) se bat ge tun ats ej basa (lad, a2 9,3, 0), Engel tics pst rt germ 03000) Fngr-pni best rat Sperm 030.0). npr jst wr Sngr- mnt 0,300.0). ete ad tobe ane (remot dat, 0300.0, erie, ge tet ple remote eg ar 0.30,0). ole fg? a ~ oj tus ( ele finger uti 0,30,0). rot ger} bjt taste rote ge a0, 30.0), eb (ahd RED daw bjt Gage. gmat, RED ‘ow_objet (remote nger2_2, emote nger_ matrix, BLUE ® fn. (smear 2 remote Ser tb BLE x fe stem ret ee, i BA toe tA tm te Taw treet er ge BLE bt roe pote i BLU Seinen nae aa aoe ee byt ge et ae). oe bet fe ee bt ge se bt he 2). eee oat ge 2 ese bet tng} 2), eee bet get 2) ee bel ge 3), se bet ge) se tet finge 3), sme et fiat 3) und ane = bjs han mais. 0,0) age atc cet eget ©, 30,0), Faget maar~ cette Gato 0 3080) fogs. becasue 0.30.9), ete hand matic objet trates, and in, 0130.5) "ats ger. matic =bjet_ tami sete ger iat, 30,0) emerge aes ce sete ge at, 30,0), Teme fnge atic objet Sus sete ogo at, 900.0) met (get, get RED), ew objet (ge, ge ati, RED); eo bjt ge, ges. ain, RED); debt ne ger) a RED, objet (rece and emote band mai BLUE) daw bet fester emo ng_ mt BLUE). rw bet remote Baga emote Sgt BLUE) dow byt (remote oat Sgt_ mat BLUE ‘wt (rst Sagar emt Sgt mate BLUE am objet rte Sager. rane eye mati, no, Sea ep ance tcaeny Chk forts inj (handprint, Ay a, ode) a (ete tan >pgenspeins A, voted ia) 100) esa ( ep 1) 48 rect gig —1)) Choco 0). ose, zen = one (ame 0) TerdeoscTa“)( ‘ova, to sed, ve nt HIRES, NULL. Sake) teow yo) ¢ Bor ato ote gre rem lovey temo pve, ewan) ‘henge 2 (gov ploren) eosin ‘osteo *-2, MGgovy> oes) iy ebapov yale) *25; oe yahoo) * 25, fone poe) “hays °; Mga > over) aig ore) * 20, oo aig 2ore) * 200, sone" gov roses = Tame hand ma bjs satan mai 3.2) get ame" jest Sse ge Ne 2 Js gent ~ bj tong. foyer} mate = bjt bulge ate? , st¢change=2) 0 fue hand (Suet age ue ot (og). sept (fe) roe byt fie) ‘roe ine 2) eet 2) hoe bjt (ng 2), roe tet get 2) rset ge 3). frst_oet ge) sept (ge 3), se bet (ge, = ior eys nt) <°OxAD) a ca ak Howe (A who sied= , dbo Soe On) <= 04809) fi sia. ca tee t ‘in ~0. , ila 984 1) tin roto, ya grat) npr mec bet elt Engin 9 ‘e(ueszotl 0) (Seer mae ot gr 9), ‘Sig mate obj Hagar 30, fing aie beet eae Seger. Ma. 2), in jin, Ay, agua) nore jc alg at 9-2 ‘t(hoezomat 0) ( cma yo eat 80 figeacpann socom ge 0, yas the i ng tic jt ge. matin 10) ogc mi ast nat Eger ney smh, 5 “appa es BS NT Engrs mum = jen bse eget. t¢tozomt—=0) « Sng = bjt yor gem 90) Engrs = objet Oune fingers mate 250, ( ngs. atin = bjs. tga. mat) nga object bese rea. 90,258) 7 ) ice ain) 44 Carp i a pr ( Aion, xy, ge maic)s ‘ner mnt = bjs Bast Hinger tai E ‘Coen 0) nga bjt yo germ 90): ing. = bjt gee_ mat 30), igen = bjs ate ger a9. 2) tin proj ( jt tm, 8 Ay, ger mati) Sng? masa can begs? ab.) Cbonznal—0) 0 ogra bjt ot (ingen 10), feng tnt jst valet Singer? mans 300, 3. east 2 ‘ grt. mie object tiger mati, 190 fener bjt oun Sgr macy, a i pr ( Aint, x,y, 2, gest: Enger mnt jen ote eget at -2 ‘Creat 0) i og. ai = bjt yo grt, 70), tera = bjs ge mab 20, y, aay ° ni ing an~ jst. Sige. ma, 90% fier > bjs ged. ai, 9°25, y , {tgoesot> 3) ax lov st fi ‘npr hn pobgonepais, 8 yA od a esta =) nd tices and me 92) an at jest (and at 30) an aot (La 2); tet mn et lenge a 9-2) fpr mat bjt aot ager 50), ‘Egret bes eat grt mars anger mete object eae gr, mai 2: fgrt me = object met ge aD) Snger-mtm = oj ral Seger? matt y.2) fern bjt walt Seger. raise 9.) freon bjs at (ge a5) Sirgen = eeu ge mu Y2). emi =0 , a GAT) RE Rom ti_o(hand>ptgene pes, Ay 2, hand) band asic bet ie (ana ind mans bjt ar han 90) ‘Noma jt ie (ed abi, 9-2), th Argent objet tae (grat 2) nga aoc abst (age ma 9 npr ati abet Sper UE Y.2) Anger ti = objet tte (Enger. mai 9-2), fngr- mac abject ten 9): ger mac ayes nge at 2): fer. matin objets (Singer. 9,2) Engen abe on ma 9) fnger.marc abe eae (ge. a 9.2) y (crags = 1) Sw jt (tnd andi RED Sov sept ge ge te RED: ‘ison dnget Sgr ec RED {Er Seen ange mae RED ‘Sor hot dng es ns RED, bet (eget 2 Ser mai RED): dows bet (ge nga RED): ‘ho tpt (ge 2 erat RED) dno etet (get 2 Enger RED ott (Sega, Seta RED) Stew -ejetEnger 3 ge ae RED Shen nger 3 ge ae RED howe (er ge ut RED ange Tere pve hrs hon renele Bove pip“: {ook wea Soe ote, seen glove) y » ‘ gone. de st sek dateny(45)) ¢ nck ol As Azone plover hv ese. bet (sme ad) ese bjt (rete. ‘ae bgt (remteinge rset (tee ig Seo aet io fget Sie bet rete ge 3) settee ge 2) ‘Sreobpet rere ge? ‘Sue bet (sot se bet (toae_ge 3), ‘ue. obet rose ge 3) ine bet rose age 3) Sue bt (rome get rete hand mat = bjt rslaton nda, emt gov emote love smite gore). ete ge ui = bjt alte ‘Bf omits loves role ve, ‘ene gow ee, Sged. abject aa ste yes ome me ente vey, ‘sme. give2) ‘trate ozo rete. hve orzo) pote biz = remote plow harm 'FUremote onze 0) note soveang sp) (temo apoyo, 89.82, remote hand ae). -2) emote glove a, , ~ Teno han = bjs ( emote hae ma 92) teote Singer sat ~ bjs aa sexe, ge ai 3-2) ree ng marc remote Sgt at emote glove are). Tena ger at= oe use emote Seg mix2). reeks Singer. matin = objets seote free? ms 9.0 ote fnger2 abc 0 snot finger st emote Boe) Tenet get at oe Sane vente figs? at Y.2) ert fnge. air ~ objet tre nt geri “ee fgets obet a eve gers aye lovee), Tene ng at et le eS mat. ete gear bet ale ene ge a rete owe ee vey, rene vez) ire ove iy = 0) AA (rete ve i remote gp) ‘nn po joe, x yz, enol feta remote figs aig 2 ‘teem honmmai=e)” ene ge atin ot remote foger.e 9 Tanager ai ~ jst tua seote we ating 2) i ete figett_ mai object not sete ger at) eet Grget at objets remot ings min . ip into, ys, sete ied me) tere ge at). 2) ‘irante Benzo —“0)¢ ote ger. ice ot rent get ma), Teme, Gye ai = chet tana remote fge ma £300,238), ? te Tere ged marco aot repels gem 19) ‘ese ge a= obyet tse sone ei 9,239) SET sete frye ai) sor nije ne remote age mate 8-2), if remotehorzsl=0) ‘ ete ge mt obje yo remot fge8. as 20) son em 8. , tre sove p—1) AA (ete ip = remote ap) C sete = tse Sse, Ax Ay, A, ete Binge, matix~ objeto sear os emt. get abn = jet the rege a yD) sin (jt. tae, ty. A, emg 90). erie ge ates 280,927) ‘eowe_sbet figs 2) ote obit (Sega 3) ese (emote Snge_2} ‘ee je remote Sige 2). ‘ee sje eet ig 2) ‘oe sje remote ig.) ee je (remote get) owe sje remote fge 3) lesa remote Sages 3) ‘oe ee rameteSnget 3) ie ete nd.) in ohjet role Soger_ 2. eae ge, mati, aut. er ie (om een, oe objet remote. rte fge mais, va shen Ege me, oe min ino rmoleSger_ 3 emote mais, su, at (ete erence gest, sata (oe 3 rete ge at nwo remote Seger} moe, ge mai, Bur), stu who lsd): ) seem id si as, ha “a t in grphmode papier 2, dove datato een pr Wig fr case) tame ‘ "ep ste 45 PORT, 0.0 NULL 0) ok mae as TCP MODE BINARY), feck wat sted NULL tt in Press any ey ob) a. ok ie (A, Ate. suet) P te t oat att semana host) fi ‘enwtnableto reve ast), oa). , cpt Une oop omeson ott D sock mode &s,TCP_NODE_ BINARY Sick wereld Asoc doy NULL, Rtn, eck ods, te soem p ‘ove it HIRES, NULL Faxon he loved ten Pr ny oy") ‘mno) Tre ve ety) ove dy, ‘ove redo) f feet. Intgrap ( grphver, Agraptannds"* Loch ‘det = (st milano at), Engin “aetna finger. mate ~ rat mts aba mabe), fing mane ~ (erst mete abet mas), ‘arty Chand ma ‘dey ig ey ge ey ge. Tern hand ti tut mi “nals saa Tarte, yel_ matic =(oct mu "aloft sa) Temi ied mic ct marr pmaocecetset sa) Ten ged tic = uct mari “pmasizttst ma) ray (remete hand ati) erty emote Sree mae erty (etree ta sy (remot fige at rae, si tarot Steno. per shad oat objet (tan a atin RED) et (ger, ge ati RED); vw st (ge, ge. a RED Set ge tm ED nw objet (eget 2. ger. mai RED dew abut ge? 2. rg matic RED (dow st ged 2 ger? mat RED ‘vw tt get ger? ate RED ‘hw set (ge rer. at RED nw set ge. Ergo. atic RED wet (ges rg. mat RED fw set get 8 gr mal RED rw. objpt (rote.anemtetnd eai BLUE (daw spt (remote firgermolefrgr em BLUE), ‘debt rm figs rete rger ra BLUE (daw sty (cnt gers emt rg muse BLUE, ‘Sam bet cote gerd rem ogert- mae BLUE), ew. (rete eget 2 emote Sng BLUE “dem tt note ge 2.emot Sgt, BLUE x ‘ew st rote Sgr. 2 rete ge. atin BLUE ist rele Sige 2 remote Beatin BLUE > domi (root Sg eben BU ott remo ae ont Sings BLUE * ott (rot aye 3 ete gai BLUE "oe og ee ge, UE hohe ain op sieve ai. Finca ate ‘Sse 7 sock wt clved (sok ay. NULL, Ast) ca | D soto doe ‘ ch (stat) ( Tae! sue Comecton dts, sel spasCRENOTE HOSTCLOSED ook cee): ook wat sed xck ey, NULL st), , 2010 A PCVR Board Joseph D. Gradecki For experimentors in Virtual Reality on the PC, the network is the easiest way to find out what other people are doing. Several of these things involve the use of electronic circuits. I have produced printed circuit boards from these circuits. Two of the circuits that have been verified are the Sega Glasses interface and the 68HC11 PowerGlove interface. These circuits will be described in later issues. For now here is the schematic, parts list, and printed circuit board layout for each. NOTE: These circuits and circuit boards are not warranted by the author or PCVR magazine. Build at your own risk Sega Glasses This is a simple circuit that has been floating on the net for some time. Parts List: 1 - CD4030 XOR Gate - Do not use 74LS86 as a replacedment. 1 - 2N2222 Transistor 2 - 22k 1/4 watt 5% resistors 2- 10k 1/4 watt 5% resistors 1 - 0.01 uF ceramic disc capacitor | - 22 uF electrolytic capacitor 3 IN914 diodes 1 - stereo 1/4" jack 1 - DB25 or DB9 connector It is imperative that the IC be a CD4030 and not the TTL replacement 74LS86. This circuit can be mounted in a case for convenience. The following page displays the printed circuit artwork used to produce a board. The plots are 2 to 1, which most prefer. This is the top of the board looking at the TOP. 2. ‘This is the bottom of the board looking at the bottom. The next circuit is for the 68HC11 board for the PowerGlove. The schematic is 68HC11 Based Power Glove Interface - Ron Menelli 11/19/91 Parts List: 1 - MC68HC811E2P microprocessor 1 - MAX232 1 = MC34064P-5 1-8 MHZ crystal 2- 18 pF disc capacitors 2 4.7 uF electrolytic capacitors 3 - 10 uF electrolytic capacitors 4 = 4.7k 1/4 watt 5% resistors 17 - 10k 1.4 watt 5% resistors 1 - 10M ohm resistor 1 - 0.1 uF disc capacitor 1 - Nintendo connector 1 - DB25 connector Note: This schematic and all related code was produced by Ron Menelli. We will be discussing this circuit and the related code in a later issue. To the best of my knowledge, the microprocessor chip costs in the area of $50.00. The printed circuit board art is on the following pages in a 2 to 1 format. Graphics - Basic Joseph D. Gradecki The foundation for any Virtual Reality system is 3D interactive computer graphics. In order to help those new to the field of computer graphics, we will try to introduce some of the concepts that allow you to develop a graphics system of your own. In developing computer graphics for my own use (which I am still a novice), several books where very helpfil “Computer Graphics" by Donald Hearn/M. Pauline Baker and “Art of Graphics" by Jim McGregor and Alan Watt and of course, "Computer Graphics: Principles and Practice, second edition” by Foley, van Dam, Feiner, and Hughes. ‘The Foley book is theory and some practice. The book by McGregor has BASIC code for the IBM PC but shows implementation of concepts. This column gives the theory behind the different concepts of computer graphics and show the implementation using Borland C (Turbo C ). The first topic is the coordinate system for computer graphics. 3D Coordinate System The three dimensions in the coordinate system consists of the x, y, and z axis. Visually these appear as: y Aas ZAxls x Axis This coordinate system can be positioned in two different positions called right and left-handed coordinate systems. A right-handed coordinate system can be envisioned by putting your right hand in the air and acting as if grasping a bat. Now, put your thumb outward. The direction that your thumb points is the positive z direction. A left-handed coordinate system is just the opposite but this time use your left hand. To transform this coordinate system onto the two dimension computer screen, position the right or lef coordinate system in a familiar pattern, There are arguments for both the right or left system, for simplicity, we will use the right-handed coordinate system. Place the origin of the three axis in the lower-left corner. The x axis should be placed on the horizontal part of the screen. The y axis should be placed on the vertical part of the screen, With this orientation, the positive z axis projects out of the screen and the negative part of the z axis projects into the screen. We now have a three dimensional coordinate system that can be put onto the two dimensional video screen. Projection If we think about what we have done, we realize that any object in the xy plane, z= 0, can be represented on the video screen as it would be in the 3D world. This object could only be a plane or a section ofa plane. What if the object is a true three dimensional object like a cube? How can we represent this real object on the video screen. We need a function that allows a projection of a real world object onto the screen. The basic problem we are dealing with is depth information. The cube will have distinct depth to it when looked at. There are several techniques available for indicating depth in a graphics screen. We will look at two popular systems: perspective and parallel projection. In parallel projection, parallel lines are projected through the object and onto the screen. By varying the viewing position, different points will become visible. The object keeps its basic proportions. If we had a simple house, we could use parallel projection to look at it from the front. Now if we moved the viewing location to the side, we will see a different view. Notice that the proportion of the house remains the same. This projection technique is fine for some computer graphic work but when we want to display a realistic image of a three dimensional object on the screen, we need a different way. Perspective projection allows for depth by changing the size of an object depending on the location of the object from the viewer, simulating real life, Recall how a distant piece of highway appears in the horizon. It is small until be come upon it. As for our houses, the second house would appear as Notice how the end of the house appears small and farther away than the front of the house. This projection is the most common one used in interactive computer graphics. In both of these projections, we have taken a liberty called hidden-line removal. In both of the houses above, some of the lines that make up the house are not visible. For instance, the entire back of the house is not shown. If hidden lines are not removed, we have the problem of determining which part of the drawing is the front or the back. Take the following illustration as an example. As children we were taught to draw a box as two squares with the corners connected. This picture of a cube has the problem of depth. Which side is the front? If the lines that make up the hidden surfaces are removed, the problem is trivial. Implementation The first transformation that implements the viewing transformation. The viewing transformation takes us from world coordinates into screen coordinates. World coordinates are just that coordinates that represent the object as we see or design it. World coordinates cannot be directly mapped onto the screen because of the significant resolution differences. We will use a system based on spherical coordinates. The transformation matrix is V= -sintheta -costhetacosp cos theta sin phi 0 cos theta -sinthetacosp _-sin theta sin phi 0 0 sin phi -cos phi 0 0 0 tho 1 The matrix operation is (xe, ye, ze) = ( xw, yw, zw)V, where xe, ye, ze are the new eye coordinates and xw, yw, zw are the world coordinates. Theta, phi, and rho will be used to specify the position of the viewpoint in world coordinate space. To get a handle on the use of the spherical coordinate system, image specifying a point in world coordinate space to be our viewpoint. If we draw a line from the origin to the viewpoint, rho would be the distance of this line, theta is the angle that a plane on this line makes with the x axis, and phi is the angle that a plane on this line makes with the z axis. Once we have the eye coordinates, we need to project them onto the screen using the perspective transformation. This is done with these two equations: ys= dis X ye/ ze xs= dis X xe/ ze Dis is the distance from the eye to the screen. This is a different distance than rho, since tho is measured from the origin to the eye. The mathematics are quite involved and space does not allow for a full explanation. I recommend checking the Foley book mentioned above for a theoretical explanation, The following short program will illustrate some of the above concepts, A simple set of axis will be drawn on the screen. Using keystrokes, different aspects of the scene can be changed Tasca opr Vig Stee Dea ‘nce th por a start he as eR, Tet Pi an ‘eet be payed te wpe smote “Te vipat change by sg te lowing es Ts decae hey 5 depes Cosme thy ees dct by 0 pits "ince by 0 pas ere py 8 dees Poin py Ses 1 cease dane of ee gin ere dss oe 0 OB “Te xg wilappar seen oan 328,24 “Teen ofthe coor 5st cole Be ‘They a ofthe coonnate yt elated ‘Tai ofthe sorte sytem ole, che ache ele pups Saclde ono cle cont ee radians 00178397. ‘estos, ‘ies 300, e190, ren = 10005, it Soeen ay 2a, At avhvetogvinivk ‘wid cuteer basa) \ Boat secon, spi, oh: sitesi feast" ras. Sits ris). esd ro (inti int cin“) c ote y Trash ae cow ienarne swe jereen vey stew elm giywe eon Tanase Soymtarandit ye 2e eid ro ‘ char. Sty: paca) hp Selo BLACK rj (20.0.0. sotto (32,4). (erm. x seen 3) relia. ay. ott (32,30, (sre. 86121) rj(0.0,20, 8.49). monet (3200 et (sen seh 24 spt A,“ it sre! selon (BLUE). (2,00, 49), Poet (32,30) (see. 20 e_299 Scab (RED). ei. 0.83. 9), Foot (30,20) eo (sea. 2x ee 399) Sale OREEN eo ,0,20, 8) et (32,20) to (Sree, eee 299 pat ats" selon WHITE ‘ent, "te ety (1,107), ney 10, 10, SenoyCt.a0 ste 120 ep se ow." Sis (acho), ‘sme 10,3, Sop," sete (1,40,"Baeen="D. ser {10 eed c char hte 04, beso, rapier Setup gui ssn */ ‘poten VO iran =VoA, gach grape, apis “> cet sew aneirmaons: 7 Setup tories *) carved. ch dae sen Facer ‘enor BLUE), re (20.6, 83. Foto (30,38) kno seen 2x see 29> ‘Sr (RED), yo}, 208,, a Ay Ion (20 jaa (scene ten 299 ‘clr GREEN). 0) (0.0,20, a3 29, ‘rove (32,290 me (seen ste. de sain ‘eae WHITE): ‘Spa tag, eth). ‘mee (10,1 et (10, i, ‘Sem tone, 8 fetesoy (1,2, ‘ty (100,20, tons (1, to) ‘ty 10, Se). Senet Comp ose acy (10, eee") ‘ey (10089 ove Movant op? Sowa ‘Ral pice en */ Next Month The theme for the next issue will be Head Mounted Displays. Topics will include an explanation of the SEGA 3D glasses, basic idea of what a HMD is, and plans to built a Head Mounted Display. If you have any thoughts or ideas that you wish to share, write them up and send in an article. We are unable to pay for articles however the more articles we get, the bigger circulation, and then we will be able to pay for articles. For now, the pay is the wealth of information shared and gained in an atempt to make VR a reality for PC users, The Last Page Submissions If you would like to submit something for publication, a complaint, or a letter to the editor, you have two options 1) send a disk ( any size, density ) with an ascii file, WordPerfect file, Word for Windows file. Please include illustrations in either PCX or GIF format or in the document if using Word for Windows to the address below. Please double-space Software Orders will be happy to send you a disk of the software presented in this or any issue of PCVR. Send a letter with the issue number, size, density disk and $5.00 ( this covers the disk, mailer, and postage ) 10 the address below. PCVR 2706 Sherman Hill Rd #A Laramie, Wyoming 82070

You might also like