With this module a wide variety of procedures can be used, either singly or in combination to transform two-dimensional motifs and alphabets.
The following resources are available
34 motifs
6 alphabets
26 procedures
It is also possible to add to the designs interactively from the keyboard, or by using a joystick.
To use the module
10 PROCload("RHINO") 20 PROCdrawandscale(640,512,1) 30 END
3) Type RUN and press RETURN.
The program prelude that is loaded with the module is:
1 MODE 4:HIMEM=HIMEM-1260-2340-570 2 PROCinitialisememory(4,TRUE,TRUE,TRUE)
This can be altered to make best use of memory in the following circumstances:
1 MODE 4:HIMEM=HIMEM-2340-570 2 PROCinitialisememory(4,FALSE,TRUE,TRUE)
if you are not using motifs
1 MODE 4:HIMEM=HIMEM-1260-570 2 PROCinitialisememory(4,TRUE,FALSE,TRUE)
if you are not using alphabets
1 MODE 4:HIMEM=HIMEM-1260-2340 2 PROCinitialisememory(4,TRUE,TRUE,FALSE)
if you are not using interaction
The following procedures are available:
PROCalphaslice | PROCinteract |
PROCboxwindowin | PROCload |
PROCboxwindowout | PROCloadalpha |
PROCcircIewindowin | PROC1oadscreen |
PROCcirclewindowout | PROCreflectx |
PROCdrawanddeflate | PROCref1ecty |
PROCdraw and inflate | PROCrestore_fore_col |
PROCdrawandreflect | PROCrotate |
PROCdrawandscale | PROCsavescreen |
PROCfore_to_back_col | PROCscale |
PROChshear | PROCstretch |
PROChtext | PROCvshear |
PROCinitialise | PROCvtext |
Details of how to use each of these procedures are given later in the manual.
Two-dimensional linear transforms operate on the current motif in memory. The transforms alter the attributes of the motif but do not draw it. Motifs are a list of coordinates with respect to the approximate centre of gravity of the motif. That is, point (0,0) in a list of motif coordinates is near the centre of the motif. Two dimensional transforms and operations on motifs work with respect to the motif origin or centre. Any calls to these transforms must be succeeded by a call to PROCdrawandscale if the motif is to be plotted.
The transforms can be used in a combination sequence (see below). The alterations to the attributes simply accumulate in memory
The examples here show the kind of results that can be obtained by using the procedures in programs with other BASIC features. For ease of comparison they all use the same motif.
The position and scale of motifs can be controlled in a FOR loop.
10 PROCload("GULL") 20 PROCdrawandscale(640,512,1)
The position and scale of motifs can be controlled in a FOR loop.
10 PROCload("GULL") 20 scale=1:xo=250:yp=350 30 FOR i=1 TO 4 40 PROCdrawandscale(xo,yo,scale) 50 xo=xo+300:yo=yo+50*i:scale=scale*0.7 60 NEXT i
PROCboxwindowin and PROCboxwindowout can be combined to produce a wide range of effects.
10 PROCload("GULL") 20 PROCdrawandscale(640,512,1.5) 30 PROCboxwindow(200,250,900,550) 40 PROCboxwindowout(250,350,700,100)
One call of PROCboxwindowin followed by three calls of PROCboxwindowout in a FOR loop. The window dimensions and scale of the motif are reduced after each call. An IF statement ensures that the centre block is blank.
10 PROCload("GULL") 20 PROCdrawandscale(640,512,1.5) 30 PROCboxwindowin(200,100,900,900) 40 boxshrink = 75 50 scale = 1.4:xs = 250:ys = 150:length = 800:height = 800 60 FOR i=1 TO 3 70 xs = xs+i*boxshrink:ys = ys+i*boxshrink 80 length = length-i*boxshrink*2 90 height = height-i*boxshrink*2:scale = scale * .57 100 PROCboxwindowout(xs,ys,length,height) 110 IF i <> 3 THEN PROCdrawandscale(640,512,scale) 120NEXT i
Using PROCboxwindow in different vertical positions creates a series of blank stripes.
10 PROCload("GULL") 20 PROCdrawandscale(640,512,1.5) 30 xs = 200:ys = 100 40 FOR i=1 TO 5 50 PROCboxwindowout(xs,ys,950,25) 60 ys = ys + 200 70 NEXT i
PROCcirclewindowin and PROCcirclewindowout can be similarly combined. One call of each results in an annulus.
10 PROCload("GULL") 20 PROCdrawandscale(640,512,2) 30 PROCcirclewindowin(640,512,450) 40 PROCcirclewindowout(640,512,200)
Multiple calls of PROCcirclewindowout can be made so that the centres of the circles themselves form a circle.
10 PROCload("GULL") 20 PROCdrawandscale(640,512,2) 30 PROCcirclewindowin(640,512,500) 40 FOR theta=0 TO 360 STEP 45 50 xs=250*COS(RAD(theta)):ys=250*SIN(RAD(theta)) 60 PROCcirclewindowout(xs+640,ys+512,50) 70 NEXT theta
In the next example PROCrotate is applied nine times, with a scale increase each time. The result is an attractive pattern even though it is not easy to see what the original motif is.
10 PROCload("GULL") 20 scale=.6 30 FOR i=1 TO 9 40 PROCrotate(10) 50 PROCdrawandscale(640,512,scale) 60 scale=scale*1.1 70 NEXT i
Five applications of PROCrotate together With a scale increase and alteration of the start coordinates give a more pictorial result
10 PROCload("GULL") 20 scale=.4:xs=1100:ys=800 30 FOR i=1 TO 5 40 PROCrotate(10) 50 PROCdrawandscale(xs,ys,scale) 60 scale=scale*1.2 70 xs=xs-220:ys=ys-80 80 NEXT i
Similarly, four applications of PROCstretch in directions given by theta = 0,20,40 and 60 produce a 'recognisable' picture. A point to note here is that PROCinitiaIise is used so that each stretch is applied to the original motif.
10 PROCload("GULL") 20 xs=100:dist=30:i=0 30 FOR theta=0 TO 60 STEP 20 40 i=i+1 50 PROCinitialise 60 PROCstretch(0.3,theta) 70 PROCdrawandscale(xs,400,1) 80 xs=xs+250+i*dist 90 NEXT theta
PROCinitialise is also needed for this pattern, which is produced by five applications of PROCdrawandreflect. What would happen if it was omitted?
10 PROCload("GULL") 20 dist=280:scale=.7 30 FOR i= 1 TO 5 40 PROCdrawandreflect(670,500,scale,dist,30) 50 dist=dist-40:scale=scale*.85 60 PROCinitialise 70 NEXT i
Eight applications of PROCdrawandrefIect will produce this pattern. Again PROCinitialise is important - it ensures that theta is always applied to a non-rotated motif.
10 PROCload("GULL") 20 FOR theta=0 TO 315 STEP 45 30 PROCdrawandreflect(640,500,.7,200,theta) 40 PROCinitialise 50 NEXT theta
PROCdrawandinflate has some interesting subtleties. Here it is called seven times with decreasing expansion and constant scale. How would it look if the expansion was constant but the scale decreased?
10 PROCload("GULL") 20 expansion=2 30 FOR i=1 TO 7 40 PROCdrawandinflate(640,512,0,0,expansion,1) 50 expansion=expansion*.8 60 NEXT i
This result was obtained by combining three procedures: PROCstretch, PROCreflecty and PROCrotate, but don't forget that without PROCdrawandsca]e you won't see anything!
10 PROCload("GULL") 20 PROCstretch(2,90) 30 PROCreflecty 40 PROCrotate(30) 50 PROCdrawandscale(600,350,.7) 60 PROCreflecty 70 PROCdrawandscale(60,350,.7)
Text can also be transformed by the procedures in 2DMOD1. Note that the procedures operate on the entire word and on all subsequent calls of PROCvtext and PROChtext.
10 PROCloadalpha("ALPHA1") 20 PROCrotate(-10) 30 PROCvtext("ROTATE",200,950,.7,20) 40 PROChtext("HORIZONTAL",90,620,.7,20)
Note the call of PROCinitialise before printing "AND".
10 PROCloadalpha("ALPHA1") 20 PROChshear(.5) 30 PROChtext("XREFLECT",10,700,1,10) 40 PROCreflectx 50 PROChtext("XREFLECT",10,650,1,10) 60 PROCinitialise 70 PROChtext("AND",550,300,.3,20) 80 PROChshear(1) 90 PROChtext("SHEAR",200,100,.6,50)
Individual transformations can be applied to single letters
10 PROCloadalpha("ALPHA1") 20 PROChtext("B",100,500,.5,10) 30 PROCrotate(-10) 40 PROChtext("A",200,400,.8,10) 50 PROCrotate(-10) 60 PROChtext("N",350,300,1.2,10) 70 PROCrotate(-10) 80 PROChtext("G",600,120,1.9,10)
Text and motifs can be transformed together - in this case by the same call of PROCrotate.
10 PROCloadalpha("ALPHA1") 20 PROCload("GULL") 30 PROCrotate(-30) 40 PROCdrawandscale(500,600,1) 50 PROChtext("SEAGULL",80,310,.6,20)
Now look at this example where the text and motifs are transformed differently. An Initialisation, which in this case is forced by PROCloadalpha, must be applied after the motif has been completed.
10 PROCload("GULL") 20 PROCrotate(-45) 30 PROCdrawandscale(500,600,1) 40 PROCloadalpha("ALPHA1") 45 PROCinitialise 50 PROChshear(1.5) 60 PROChtext("SEAGULL",100,100,.6,60)
The module is a reduced version of 2DMOD1. It permits the use of motifs and interaction but not alphabets. It allows the use of some of the Graphito resources in a high resolution mode (MODE 0) or in a mode that has more colours available (MODE 2). It can also be run in medium resolution (MODE 1) with four colours. You will find that the colours and textures available in MODE 5 are also available in MODE 1, but at a higher resolution.
The following resources are available:
34 motifs
12 procedures
To use the module:
The program prelude that is loaded with the module is:
1 MODE 2:HIMEM=HIMEM-1260-570 2 PROCinitialisememory(2,TRUE,TRUE)
This can be altered to make best use of the computer's memory in the following circumstances:
1 MODE 2:HIMEM=HIMEM-570 2 PROCinitialisememory(2,FALSE,TRUE)
if you are not using motifs
1 MODE 2:HIMEM=HIMEM-1260 2 PROCinitialisememory(2,TRUE,FALSE)
if you are not using interaction
In addition, the mode number in line 1 and the first parameter in line 2 (which are both 2 in the version loaded from the disc or tape) can be changed to any other mode number.
This module enables motifs or 'clusters' of motifs to be displayed in networks or 'wallpaper' groups.
34 motifs
6 alphabets
21 procedures
The module contains a procedure allowing users to design motifs of their own.
To use the module
For example
1000 DEF PROCnetmotif(x,y,scale) 1010 PROCinitialise 1020 PROCload("GULL") 1030 PROCstretch(2.5,0) 1040 PROCrotate(60) 1050 PROCdrawandscale(x,y,scale) 1060 ENDPROC
defines the motif and
10 PROCnet(5,3,250,350,100,100,30,.26) 20 END
draws it on a net.
3) Type RUN and press RETURN
The prelude that is loaded with the module is:
1 MODE4 : HIMEM=HIMEM-1260-2340 2 PROCinitialisememory(4,TRUE,TRUE)
This can be altered to make best use of the computer's memory in the following circumstances:
1 MODE4 : HIMEM=HIMEM-2340 2 PROCinitialisememory(4,FALSE,TRUE)
if you are not using motifs
1 MODE4 : HIMEM=HIMEM-1260 2 PROCinitialisememory(4,TRUE,FALSE)
if you are not using alphabets
The following procedures are available
PROCalphaslice | PROCnet |
PROCcharnet | PROCreflectx |
PROCchardesign | PROCreflecty |
PROCdrawandscale | PROCrestore_fore_col |
PROCfore_to_back_col | PROCrotate |
PROChshear | PROCsavescreen |
PROChtext | PROCscale |
PROCinitialise | PROCstretch |
PROCload | PROCvshear |
PROCloadalpha | PROCvtext |
PROCloadscreen |
Details of how to use each of these procedures are given later in the manual
There are exactly 17 ways in which an asymmetric motif can be arranged to form a two dimensional network pattern. These are known as wallpaper groups.
Each can be generated in this system by generating a motif cluster using DEFPROCnetmotif together with an appropriate call to PROCnet. The groups are summarized below using an asymmetric triangle as a motif. Each group is given together with a suggested recipe for PROCnetmotif. In each case adjustments in the x and y parameters of PROCdrawandscaIe may be necessary to gain the correct symmetry. Note that this method of using elementary motifs to make a motif cluster is not the only to way to proceed. With group 1 7, for example, you could use the generation scheme for group 1 provided you started with a motif that possessed the appropriate rotational symmetry.
The motif 'cluster' generated by PROCnetmotif is boxed in each illustration.
This is the basic network group and simply requires a motif to be placed at each point on the net. The motif definition should be;
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 ENDPROC |
![]() |
This group involves a reflection about the x axis together with an appropriate displacement.
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCreflectx 1050 PROCdrawandscale(......) 1060 ENDPROC
![]() |
![]() |
The motif cluster in the group is formed by a 180° rotation.
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCrotate(180) 1050 PROCdrawandscale(......) 1060 ENDPROC
![]() |
![]() |
This motif cluster is formed from four motifs
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCrotate(180) 1050 PROCdrawandscale(......) 1060 PROCinitialise 1070 PROCreflecty 1080 PROCdrawandscale(......) 1090 PROCrotate(-180) 1100 PROCdrawandscale(......) 1110 ENDPROC
![]() |
![]() |
This group is formed using the same PROCnetmotif definition as group 4. The y displacements in PROCdrawandscale need adjusting.
The cluster in this group is formed by x reflection. The cluster is then placed on a rectangular net.
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCreflectx 1050 PROCdrawandscale(......) 1060 ENDPROC
![]() |
![]() |
This is identical to group 6 except that the clusters are placed in a net with 45° skew. Note that single motifs exhibiting the appropriate symmetry can be used instead of motif clusters. Because the beetle already possesses x (or y) reflection symmetry it can be used on a group 1 net but still possess the properties of group 7.
![]() |
![]() |
This group involves a cluster of four asymmetric motifs formed from x and y reflection. Alternatively it can be formed from x reflection of a motif that already possesses y reflection (or vice versa).
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCreflecty 1050 PROCdrawandscale(......) 1060 PROCreflectx 1070 PROCdrawandscale(......) 1080 PROCreflecty 1090 PROCdrawandscale(......) 1100 ENDPROC |
![]() |
A cluster of four formed by three 90° rotations. The clusters are placed on a rectangular net.
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCrotate(90) 1050 PROCdrawandscale(......) 1060 PROCrotate(90) 1070 PROCdrawandscale(......) 1080 PROCrotate(90) 1090 PROCdrawandscale(......) 1100 ENDPROC |
![]() |
Each cluster consists of eight asymmetric motifs grouped into two sub-clusters as for group 8. These are rotated through 90°.
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCreflectx 1050 PROCdrawandscale(......) 1060 PROCrotate(90) 1070 PROCdrawandscale(......) 1080 PROCreflecty 1090 PROCdrawandscale(......) 1100 PROCrotate(90) 1110 PROCdrawandscale(......) 1120 PROCreflectx 1130 PROCdrawandscale(......) 1140 PROCrotate(90) 1150 PROCdrawandscale(......) 1160 PROCreflecty 1170 PROCdrawandscale(......) 1180 ENDPROC |
![]() |
A cluster formed from 120° rotation.
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCrotate(120) 1050 PROCdrawandscale(......) 1060 PROCrotate(120) 1070 PROCdrawandscale(......) 1080 ENDPROC |
![]() |
Each cluster is formed from six asymmetric motifs and 120° rotation.
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCrotate(120) 1050 PROCdrawandscale(......) 1060 PROCrotate(120) 1070 PROCdrawandscale(......) 1080 PROCinitialise 1090 PROCreflectx 1100 PROCdrawandscale(......) 1110 PROCrotate(120) 1120 PROCdrawandscale(......) 1130 PROCrotate(120) 1140 PROCdrawandscale(......) 1150 ENDPROC |
![]() |
As tor group 14 but different parameters are required in PROCnet. The actual difference between 14 and 15 is quite subtle and requires a detailed study of network grouping that would be out of place in this manual.
Group 16
Each cluster is formed from six asymmetric motifs rotated through 60°
1000 DEFPROCnetmotif(x,y,scale) 1010 PROCload("MOTIF") 1020 PROCinitialise 1030 PROCdrawandscale(......) 1040 PROCrotate(60) 1050 PROCdrawandscale(......) 1060 PROCrotate(60) 1070 PROCdrawandscale(......) 1080 PROCrotate(60) 1090 PROCdrawandscale(......) 1100 PROCrotate(60) 1120 PROCdrawandscale(......) 1130 PROCrotate(60) 1140 PROCdrawandscale(......) 1150 ENDPROC |
![]() |
Group 17
Each cluster is formed by generating group 16, then calling:
PROCinitialise
PROCreflectx
and repeating the scheme for 16.
A horizontal band can easily be formed by calling PROCnet with the parameter 'noofrows' set to 1. Similarly for a vertical band 'noofcols' is set to 1.
10 PROCload("GUN") 20 PROCnet(6,1,220,0,150,700,0,.3) 30 PROCnet(6,1,220,0,150,110,0,.3) 35 PROCinitialise 40 PROCloadalpha("ALPHA2") 50 PROChshear(-.6) 60 PROChtext("HAVE GUN",120,400,.6,30) 70 PROCloadalpha("ALPHA1") 80 PROCinitialise 90 PROChtext("WILL TRAVEL",600,300,.3,35) 1000 DEF PROCnetmotif(x,y,scale) 1010 PROCinitialise 1020 PROCrotate(45) 1030 PROCdrawandscale(x,y,scale) 1040 ENDPROC
Two bands are drawn by calling PROCnet twice with 'noofrows' set to 1. PROCnetmotif contains a single rotation.
This module enables the same network facilities as 2DMOD3. It does not however include interactive motif design. The main purpose of the module is to allow the generation of mathematical and recursive motifs and the formation of these into networks.
The following resources are available
34 motifs
6 alphabets
33 procedures
The mathematical motifs are mainly circular or harmonic functions. These give 'closed' patterns with varying degrees of symmetry.
Programming instructions, prelude etc. are identical to these in 2DMOD3 (except that the name is changed to 2DMOD4).
The following procedures are available:
PROCalphaslice | PROCreflectx |
PROCc_curve | PROCrefIecty |
PROCchamet | PROCrestore_fore_col |
PROGcolouredflake | PROCrotate |
PROCdrawandscale | PROCsavescreen |
PPROCdragon | PROCscale |
PROCellipse | PROCsierpinski |
PROCexspiral | PROCsincircle |
PROCfore_to_back_col | PROCsnowflake |
PROChshear | PROCspiral |
PROChtext | PROCsquares |
PROCinitiaIise | PROCstretch |
PROCload | PROCtree |
PROCIoadalpha | PROCvshear |
PROCloadscreen | PROCvtext |
PROCmodcircle | PROCw_curve |
PROCnet |
Details of how to use each of these procedures are given later in the manualUsing 2DMOD4
The mathematical and recursive patterns in this module give rise to a whole new range of interesting results. Any of the two-dimensional transforms can be applied to the mathematical motifs in exactly the same way as they are applied to the digitized pictorial motifs.
Applying the same transformations to two mathematical motifs.
10 PROChshear(1.2) 20 PROCmodcircle(640,512,300,100) 30 PROCellipse(640,512,100,100) 40 PROCellipse(640,512,400,400) 50 PROCreflecty 60 PROCmodcircle(640,512,300,100) 70 PROCellipse(640,512,100,100) 80 PROCellipse(640,512,400,400)
An interesting area that can be explored is 'interference' patterns, where two more simple patterns combine to produce a third. These can be produced with, for instance, recursive squares,
10 PROCstretch(2,-45) 20 PROCsquares(640,512,1,10) 30 PROCinitialise:PROCstretch(2,45) 40 PROCsquares(640,512,1,10)
w-curves,
10 PROCstretch(2,45) 20 PROCw_curve(4,640,512,1) 30 PROCinitialise 40 PROCstretch(2,-45) 50 PROCw_curve(4,640,512,1)
sierpinski curves
10 PROCstretch(2,45) 20 PROCsierpinski(5,640,512,1) 30 PROCinitialise 40 PROCstretch(2,-45) 50 PROCsierpinski(5,640,512,1)
and spirals.
10 FOR theta=0 TO 330 STEP 30 20 PROCinitialise 30 PROCrotate(theta) 40 PROCexspiral(640,512,30) 50 PROCreflecty 60 PROCexspiral(640,512,30) 70 NEXT
Mathematical motifs can also be used in networks. Proceed as in 2DMOD3: PROCnet is called to generate the clusters and PROCnetmotif generates the motif.
In this case an ellipse with axes of equal length is called, so the motif is a circle and the network is an example of Group 12.
10 PROCnet(8,8,200,200,-100,100,1,1) 1000 DEF PROCnetmotif(x,y,scale) 1010 PROCinitialise 1020 PROCellipse(x,y,200,200) 1030 ENDPROC
If ellipses are used the network symmetry 'reduces' to that of Group 8.
10 PROCnet(13,10,100,100,-100,100,1,1) 1000 DEF PROCnetmotif(x,y,scale) 1010 PROCinitialise 1020 PROCellipse(x,y,100,200) 1030 ENDPROC
Here are some other mathematical networks
A network group (Group 13) formed from 'exspirals' . Each motif is formed from thre spirals rotated through 120° with respect to each other
10 PROCnet(4,4,316,286,150,200,158,1) 1000 DEF PROCnetmotif(x,y,scale) 1010 FOR theta=90 TO 330 STEP 120 1020 PROCinitialise 1030 PROCrotate(theta) 1040 PROCexspiral(x,y,5) 1050 NEXT theta 1060 ENDPROC
Network of trees.
10 PROCnet(5,5,300,200,40,50,150,0.25) 1000 DEF PROCnetmotif(x,y,scale) 1010 PROCinitialise 1020 PROChshear(0.25) 1030 PROCtree(x,y,scale,FALSE,3,45,.7,4,1,1) 1040 PROCreflecty 1050 PROCtree(x,y,scale,FALSE,3,45,.7,4,1,1) 1060 ENDPROC
A recursive square network.
10 PROCnet(5,4,350,256,128,128,175,.5) 1000 DEF PROCnetmotif(x,y,scale) 1010 PROCinitialise 1020 PROCstretch(2,-45) 1030 PROCsquares(x,y,scale,30) 1040 PROCinitialise 1050 PROCstretch(2,45) 1060 PROCsquares(x,y,scale,30) 1070 ENDPROC
A recursive square band pattern.
10 PROCnet(5,1,350,350,128,512,175,.5) 1000 DEF PROCnetmotif(x,y,scale) 1010 PROCinitialise 1020 PROCstretch(2,-45) 1030 PROCsquares(x,y,scale,8) 1040 PROCinitialise 1050 PROCstretch(2,45) 1060 PROCsquares(x,y,scale,8) 1070 ENDPROC
This module enables a variety of transformations to be applied to three-dimensional models constructed from two-dimensional motifs or text.
The following resources are available
34 motifs
4 alphabets
22 procedures
To use the module
The following procedures are available
PROCcylgrid | PROCrotatez |
PROCdecorcube | PROCsavescreen |
PROCdecorcyl | PROCscale |
PROCdecorsphere | PROCsetorigin |
PROCinitialise | PROCspheregrid |
PROCload | PROCtextoncube |
PROCloadalpha | PROCtext3D |
PROCloadscreen | PROCtraceon |
PROCmotif3D | PROCtranslate |
PROCrotatex | PROCuniscale |
PROCrotatey | PROCviewpoint |
To plot objects in three dimensions we need a set of three-dimensional coordinates. For 3DMOD1 these are
with the origin at the centre of the screen. Procedures like PROCtext3D and PROCmotif3D do not specify a position (as the equivalent 2D modules do). It is easier for the user to move an object around then plot it than it is to plot an object by specifying absolute coordinates in three-dimensions.
To create a three-dimensional scene the program structure is largely the same as for 2DMOD1. A set of three-dimensional procedures are specified and the object is then plotted and operated on by the procedures. The imporiant difference is in the viepoint specification. A position must be specified from where the object is to be viewed. The module contains a standard or default viewpoint but this can be overidden and the constructed scene viewed from any angle. For a single object scene we can achieve scaling and rotation by changing the viewpoint.
Making an object bigger is the same as moving the viewpoint nearer the object Making an object smaller is equivalent to moving the viewpoint further away. Similarly, rotating an object is equivalent to moving the viewpoint around it. For a multi-object scene, where we may want one object to be bigger than another or one object rotated and the other not, we build up the scene by applying a transformation set to each object. The entire scene is then viewed from any angle.
A program structure is then:
set up a viewpoint
load first object
specify transformations for first object
plot first object
load second object
specify transformations for second object
plot second object
and so on
For example, here each letter in the word TWIST is loaded and manipulated in turn Four applications of PROCrotatex, each of 22.5 degrees, means that the first T is horizontal and the last T is vertical.
5 PROCloadalpha("ALPHA1") 10 PROCsetorigin(500,350) 20 PROCviewpoint(1300,-45,55) 30 PROCtranslate(-700,0,0) 40 PROCtext3D("T",50,50) 50 PROCtranslate(250,0,0):PROCrotatex(22.5,0,0) 60 PROCtext3D("W",50,50) 70 PROCtranslate(300,0,0):PROCrotatex(22.5,0,0) 80 PROCtext3D("I",50,50) 90 PROCtranslate(250,0,0):PROCrotatex(22.5,0,0) 100 PROCtext3D("S",50,50) 110 PROCtranslate(250,0,0):PROCrotatex(22.5,0,0) 120 PROCtext3D("T",50,50)
Try experimenting with different values for the parameters in PROGviewpoint ant see what effect this has.
Here is a similar type of result using PROCrotatez.
5 PROCloadalpha("ALPHA1") 10 PROCsetorigin(600,350) 20 PROCtranslate(-400,0,0) 30 PROCtext3D("T",50,50) 40 PROCrotatez(-45,0,0) 50 PROCtext3D("W",50,50) 60 PROCrotatez(-45,0,0) 70 PROCtext3D("I",50,50) 80 PROCrotatez(-45,0,0) 90 PROCtext3D("S",50,50) 100 PROCrotatez(-45,0,0) 110 PROCtext3D("T",50,50)
Motifs can of course be used as well. Here a motif is translated and rotated by procedures repeated in a FOR loop.
10 PROCload("RHINO") 20 FOR shift=0 TO 600 STEP 200 30 PROCinitialise 40 PROCviewpoint(2000,45,60) 50 PROCrotatex(90,0,0) 60 PROCtranslate(0,shift,0) 70 PROCmotif3D(30) 80NEXT shift