[go: up one dir, main page]

0% found this document useful (0 votes)
66 views32 pages

Sigil Creation Computer

Other chaos magic documents of hidden knowledge

Uploaded by

oniris
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
66 views32 pages

Sigil Creation Computer

Other chaos magic documents of hidden knowledge

Uploaded by

oniris
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 32
OLR C ea Build Your Own 3D Sigil Generator hyperritual Contents 1-1: Constructing Sigils with a Computer .....0.:sssesnnnnnnnie een 1.2: Introducing Processin, 1-3: Course Outline. Week 2... Week 3... 15, ‘Week 5... / ee AM NS e ROMS 25 23 Week 6 cect A on PES 28 Build Your Own 3D Sigil Generator Iyperritual 14: Constructing Sigils with a Computer ‘Most of us here likely have a pretty commion notion of what a sigil is, but for those new to the subject or who may yet be wondering what constitutes a sigil in the context of this course, please see the Wikipedia entry on sigils, There are many Ways of constructing sigils: formal, informal, rigorous, spontaneous... And there are many ways of constructing sigils with a computer, you could use your favorite drawing program, for example (T usually use Inkscape and/or GIMP). For this class, we are going to create our own drawing program from scratch, There are again many ways we could do this, but they all involve telling the computer how to dravw the sigil, in-a language the computer understands, That is, we must specify an algorithm that breaks the drawing process down into a finite series of steps that the computer can do, which when synthesized produce a sigil that we can use in ritual magic [1]. Soive er coagula. There are existing algorithmic methods for constructing magical sigils. Sigils drawn with devices such as kameas or magic squares, of the Rose-Cross cipher, are good examples that readily meet the formalities of computer programming languages. These are well-defined arrangements of letters having magical correspondences, to which we can map words expressing or representing our intentions. An algorithm for constructing a sigil using the Rose-Cross cipher miight look like this: + Decide on a word to express or represent our intent (if we were creating @ computer program, this would be the input) + For each letter in that word... + locate the letter's position on the cipher, and... + draw a line from that position to the position corresponding to the next letter in the word. + If there is no "next" letter ~i.¢, we are at the end of the word ~ then stop drawing. That is something we can easily implement with a computer, and we will during this course, but we are going to take it into another dimension. Imagine that the cipher is not drawn on a two-dimensional plane, but in a three-dimensional space, and that the letters in the cipher do not only vary horizontally (x axis) and vertically (y axis), but also deeply (z axis). Now when ‘we map our input word to the cipher, the result (i.e. oufput) isa sigil in three dimensions. This could be difficult to do physically. How would we suspend the letters in space, in order to draw lines between them? [2] But with a computer, for which space is virtual, we can easily show the points and lines between them in three dimensions. [3] We can move the points (called vertices) while conserving their relative distances, and thus rotate the si 2 Build Your Own 3D Sigil Generator Iyperritual along all three axes ‘The computer programming language we are going to demonstrate this with is called Processing. Please see section 1-2 for more about that and to get started with it So as not to obfuscate the basic principles before we have learned them, we are going to work with a regular cubic structure and the present English alphabet of 26 characters. Since 26 is not evenly divisible by 3, we will add a "space" character to the center of the cube, around which to arrange the remaining 26 as a 3x3 super-cube: ABC JKL R&T DEF M N/UVW GHI OPQ Wya However, please feel free to share your ideas about other alphabets and arrangements, and also to create and share Processing sketches that demonstrate your ideas. This course is intended to teach you the basics of Processing, which will start you on your way toward very different means of drawing sigils, if that is what you care to do. ‘As with other courses at Arcaiorium, you are encouraged to maintain your own journal and share you ideas and accomplishments there (click the New Topic button at right, give it a name e.g. "Hypetritual’s Journal,” then post your journal entries as replies to this topic). 1. Computers are capable of generative art that uses complexity or randomness to produce forms that are not specified in detail by the computer's programmer ~- ie. suprising forms — ‘but the methods of generative art are still algorithmic. 2. Thave used Zome for this purpose. 3. And more. A computer ean draw sigils in four, five... as many dimensions was we like, but for dimensions greater than three, we can only visnalize that part of the n-dimensional sigil that can be seen in three dimensions. Build Your Own 3D Sigil Generator Iyperritual 1-2: Introducing Processing Processing is an open source programming language and integrated development environment (IDE) built for the electronic arts and visual design communities with the purpose of teaching the basies of computer programming in a visual context, and to serve as the foundation for electronic sketchbooks (Wikipedia) ‘Here are some things vou can do with Processing, For some suggestions about how to map these sorts of digital media to ritual magic, please see these pages from a previous course, Beginning Interactive Multimedia Ritual Design: 1, 2 ‘The version of Processing we will use is 1.5.1. Ifyou have 1.2.x, you should be OK, but you ‘may want to update to 1.5.1. For the first week of this course, please download and install Processing, and run through two quick tutorials that will show you how to get around the IDE and introduce you to the language: © downloading and installing (and troubleshooting) ©) tutorial 1 © tutorial 2 Tam working on # document that will introduce basic programming concepis using Processing, similar to the one | did for the Scratch class. ‘Ifyou encounter any issues or have any questions, please share them here. Next week we will begin with a series of sketches that will build up to the 3D sigil generator. Build Your Own 3D Sigil Generator Iyperritual 1-3: Course Outline Here is an outline of what I expect to cover in the next several weeks, so that you all can get an idea of what is coming up and also what is nor coming up. If there is something you want to talk about that is not listed, please mention it in in your journal, and I will try to address it. Week 1 * downloading and installing Processing Week 2 * program structure * drawing 2D lines and shapes * controlling color and line thickness * translation * variables and arrays Week 2 * keyboard and mouse input Week 3 * drawing 3D lines and shapes Week 4 * installing a library * cteating graphical nser interface (GUI) controls Week 5 * saving images and movies Week 6 * putting it all together * variations * catch up Build Your Own 3D Sigil Generator Iyperritual Week 2 These exercises will introduce you to some basic two-dimensional drawing techniques in Processing. By now, you should have run through the two online tutorials inked to in Week 1, Here are some things you may have learned during the Week 1 tutorials, but are worth reviewing: “Processing (like Java) is case sensitive — x and X mean different things. Most of ‘what you write will be in lower case. Constants are conventionally typed in all caps (eg., Xs a variable, X is a constant). Class names are capitalized, e.g. Plmage is a class (more about classes, later). For compound identifiers such as names of methods, keywords, and variables that have more than one word, capitalize the first letter of each word except the first (Le. CamelCase) — e.g., loadimage() instead of loadimage() or load_image() or something else. Only classes have the first letter capitalized, e.g. Pimage. “All statements that are not code blocks should end with a semicolon. Example:line(100, 50,100, 100); +*Code blocks are enclosed in curly braces itt) { Line (i*5,.50, i*5, 100) .for (int i/= 07 4/ 0) ( // if x is evenly divisble by 2 background (0); // draw black background } else { // otherwise background (255); // déaw white background ) xtt; // inctement x by 1 // change, framerate to correlate w/ mouse x position frameRate (map (mousex, 0,300, 1, 20)); t The % in x%2 indicates a modulo (or modulus) operation, and it returns the remainder of a division operation. it wll not be used in the sigil generator, so you need not worry about understanding it, although it is a useful operation. Review the reference page for it if you ‘want to learn more. In the above sketch, itis just a Way of acting on every other number in the counter (x), since every other number is evenly divisible by 2 (1, 2,3, 4, 5, 6, etc.) thus returning a mod of 0. ‘The map() function is one of the most useful in Processing, in my opinion. Use it to map a value from one range to another. In the above case, the range of possible mouseX values is 0 to 300, since the draw window is 300 pixels wide. But | do not want to set the frame rate as high as 300; in fact, | (arbitrarily) do not want to set it greater than 20 or less than 1. So | use map() to map the mouseX value from a range of 0 to 300, to a range of 1 to 20. As you work more with Processing, you will likely discover many uses for map(), and realize how valuable it Notice again the embedded functions: the output of map(mouseX, 0, 300, 1, 20) becomes the input of frameRate(). 7 Build Your Own 3D Sigil Generator Iyperritual You can make Processing respond to keyboard input as well, using the keyPressed() and keyReleased() functions, and key and keyCode system variables. ‘The key variable is used for all ASCII character keys (including BACKSPACE. TAB, ENTER, RETURN, ESC, and DELETE). keyCode is used for non-ASCII keys such as the arrow keys. Here is a sketch that moves the square as the up, down, left, and right arrow keys are pressed. int xPos = 150; int yPos = 150; void setup() { size(300, 300); £ill (color (255, 0, 0)17 stroke (color (0, 255, 0))j strokeWeight (3) 7 rectMode (CENTER) + } void draw() { backgrotind (0) ; rect (xPos, yPos, 50, 50); } void keyPressed() { // A left arrow key i3 pressed AND xPos is greater than 0 if( (keycode == LEFT && xPos > 0) { xPos-=10; //“same as xPos = xPos ~ 10 } élsé if (keyCode == RIGHT && xPos < 300) { xPost=10; // same as.xPos = xPos + 10 } else if (keycode == UP && yPos > 0) { yPos-=107 } else if (keycode yPost=10; } } DOWN && yPos < 300) { Notice in each iff) or else if() statement, we check both the keyCode and the xPos or yPos values to make certain the latter are not beyond the size of the draw window. The double ampersands (&&) mean AND. Without the latter check, the square would keep moving beyond the window until we could no longer see it. ‘Two pipes (||) are used for a logical OR, and an exclamation point (!) is used for a logical NOT. AND, OR, and NOT can only be used with Boolean expressions i.e. expressions that retum either true or false. Examples: sif (a G& b) // means "if a is true and b is also true" if (a || b) // means “if a or b is true” vif (!a) // means "if not a” i.e. returns true if a is false, false if a is true 8 Build Your Own 3D Sigil Generator Iyperritual Here is a sketch that draws the lines of a pentagram as keys 1 through 5 are pressed. Press the C key to clear the screen. void setup() { size(300, 300); // set canvas size background(0); // set background color to black £111(0); // set fill color to black stroke (color(255, 0, 0)); // set stroke color to red smooth (); // draw smooth lines ) void draw() { // all drawing for this,sketch is handled in keyPressed() } void keyPressed() { if (key == 10) line (150, 30,227, 270); // top to lower right } else if (key == 12") ( Line (227, 270,23, 121)7 // lower right) to upper left } else if (key == '3') ( Y Line (23, 121,276, 121); // upper left! to upper right } elbe if\ (key == '4") [ Line (276,121, 72) 210); // upper right to lower left } else if (key == *5")>{ line (72,270, 150, 30); // lower left to top } else if (key == te" || key == 'C") background(0); // clear all lines } } Notice the logical OR (\j) for the C key. Since lower-case ¢ and upper-case C are technically different characters. we need to tell Processing to clear the screen when one or the other is pressed (if that is what we want it to do). 19 Build Your Own 3D Sigil Generator Iyperritual In the last part of the lesson for this week, I am going to show you how to render text in Processing, and introduce you to string variables. This will also and incidentally introduce ‘you to declaring objects and calling their methods. ‘The first thing you need to render text in Processing is a font. To create a font for Processing, 20 to Tools — Create Font... ‘sketch _jun17c | Processing 1.5.1 = File ait Sketch (TORR) Hep Crete Font. Color Sector Sketeh_junt7¢ Archive Sketch Fix Encoding & Reload Select a font from your computer: I will use DejaVuSans. Pay atfention to the filename (in this case, DejaVuSans_48.viw); you will need that later. You'can let the size-and characters default, and keep it smooth. } ‘Use this tool to create bitmap fonts for your program. Select a font and size, and click’OK to generate the font, Itwill be added to the data folder of the current sketch, Sze: [48 | [J] Snooth Filename: DejaluSans-$3 (anes) Build Your Own 3D Sigil Generator Iyperritual Now run and study the following sketch, replacing the font file name with your own. PFont myFont; // declares a font object String myString; // declares a string object void setup() { size(300, 300); // set window size £111(255); // set fill color to white // load the font file into object myFont my£ont = loadFont ("DejavaSans-48.v1w"); iI set myFont as the font for rendering text textFont(myFont, 24); iI you can change the font size here by doing something such as iItextFont(myFont, 24), i/o render myFont in 24-point size + void draw() { background(0); J! put some characters into myString myString = "ABCD"; JI display myString in the draw window text(myString, 10, 50); iI the 10 and 50 arex and y positions to begin drawing text from 1! could also do this text("efgh", 10, 100); } 21 Build Your Own 3D Sigil Generator Iyperritual in the draw window. There are some String methods called in this script. Do not worry too much if you have trouble understanding these, although we will use them in the sigil generator (to create the input word for the sigi). If you want to explore String in more detail, you can review its reference page. PFont myFont; // declares a font object String myString = ""; // declares a string object // initializing it w/ "" prevents NullPointerException errors later void setup() { size (300, 300); // set window size £111 (255); // set fill color, to white myFont = loadFont ("DejavuSans-48.vlw"); // replace file name w/ your own ‘textFont (myFont,/24)7 } void draw(}. { background (0) ¢ text (myString, 10, 50); } void keyPressed()\ { // “aze-the backspace key to delete the’ last character from myString //4£ there is_one if: (key == BACKSPACE && myString.length() > 0) { // this just sets myString to myString minus the last character myString = myString.substring(0, myString.length() - 1); } // at keys a-z, B-Z, or a space else if((key >= ‘a! £8’ key <= 'z') I| (key >= (key ==) // add the pressed key to myString 7/ but prevent more than/8 characters’ from being typed R& key <="'2") JI // and rememeber Processing begins counting at 0 if (mystring. length () /< 8) { myString += key? ' } ‘Next week, I will show you how to draw and animate 3D images. 22 Build Your Own 3D Sigil Generator Iyperritual Week 5 Build Your Own 3D Sigil Generator This week we will lear how to import a library and use it with our 3D drawing program. A library is some code written by someone, that extends what we can do with Processing. E.g., ‘the minim library allows us to write sketches for processing audio. After importing the minim library into our sketch, we can create objects and call methods from that library, which saves Us from having to write all of that code from scratch. Here is a page of popular Processing libraries. The library we will use this week is called controlP5, and it includes a variety of graphical user interface (GU!) classes and methods we can include in our sketches. We will create sliders to control the red, green, and blue hues of the sigi's color, and the sigi's rotation speed, and a box to toggle the sigi's animation onioff. To install the controlPS library, first download it from the controlPS site. You should have a Processing folder in your My Documents folder (Windows) or ~/Documents folder (Mac). Inside that Processing folder should be a folder named libraries; if not, create one. Within the libraries folder, create a new folder named controlP5, and unzip the four folders (examples, library, reference, src) you downloaded, into that folder. The final directory. structure should look like this (Windows example): My Documents Processing libraries controlPS examples library reference src if you encounter problems, see if the instructions on this page help. When you have installed the library, exit out of the Processing application (if you have it open), and restart Processing. You can look through the sketches in the examples folder, to see some of the many ways to use controlP5. This week there will be only one sketch — it’s a big one. I will include it here in this document as well as post it on the Arcanorium forum with the proper spacing preserved, so you can copy-and-paste it into Processing. After the sketch in this document, I will explain some of the additions. 23 Build Your Own 3D Sigil Generator Iyperritual // import the controlP5 library import controlP5.*; // declare a PGraphics object named sigil PGraphics sigil; ControlP5 controlP5; // declare controlP5 object controlP5.Label label; // declare label object // declare slider objects Slider rSlider, gSlider, bSlider, speedSlider; // declare variables associated with controlP5 objects int r = 255; // red color int g = 285; ///green color int b = 255; // blue color float speed |= 0.01; // rotation speed boolean animate = false; // animation state variable // declare variables for constructing \sigil String word = ""; iY float{] xPos {-1,0,1,-1,0,1,-1,0,1, 1,01, -1,.0,1, -470,1,-1,0,1,- 1,0,1,-1;0, 17 float{] yBos = {-1, 1,0,0,0/4,1,1 float []zPos 4=1,-1,-1, 1,0,0,0,0,0,0,0,0,0,1,1,1, char[] alphabet CRUE CLD eh Et, Tere, *Tt ee, LE, + MMI Dp BE ONZE, 8" LSmh TONE, IE IK, EEE Dy float{][] sigilPos = new float[16] [3]; int. multiplier 100, float xRot: float yRot, float zRot: -1,0,0,0,1,1,1, -1,0/0,0/1,4,1, 1,-1,-1,-1,- i Mey, Pode 1 be void setup() 'f size (800, 400); stroke (255); // create the controlP5 object controlP5 = new ControlPs (this); // create the slider and toggle objects rSlider = controlPS.addSlider("r", 0,255, r, 430, 50,256, 10); label = rSlider.captionLabel (); label.set( "red" ); gSlider = controlPS.addSlider("g", 0,255, g, 430, 70,256, 10); label = gSlider.captionLabel (); 24 Build Your Own 3D Sigil Generator Iyperritual label.set( "green" ); bSlider = controlP5.addSlider("b", 0,255,b, 430, 90,256, 10); label = bSlider.captiontabel (); label.set( "blue" ); speedSlider = contro1P5 .addSlider ("speed", 0.01, 0.1, speed, 430,110, 100,10) ; contro1P5 .addToggle ("animate", false, 430,130, 20,20); // create the sigil object sigil = createGraphics (400, 400,~P3D); } void draw() { background (0); // €lear the) screen // set sigil vertices from the word to sigilize if(word.length() > 1) { for(intii = 0;\i < word-length()? i++ for(int 3=0; J 0) { word = word.substring(0, word.length() - 1)7 } else if((key >= 'a' @& key <= 'z') II (key >= 'A' && key <= 'Z') I (key == )) if(word.length() < 16) { String newletter = ""; newletter += key; word += newLetter.toUppercase() + } } println("sigil text?" + word); ? explain the conirolP5 stuff, then the PGraphics stuff. controlP5. To import the controlPS library into Processing, we include import contro1ps.*; atthe top of the sketch. Then where we declare objects and variables, we declare a ControlP5 ‘object that does the main controlPS processing, and any additional controlP5 objects (see the code). The reason we declare Contro1P5.1abel is so we can change the labels on the sliders (see blow; they default to the names of variables we associate with them). Within setup () , we create the controlP5 object that we declared, and slider and toggle ‘objects. | will break down the red slider (sSlider) so you can see how it works: rSlider =controlP5.addslider("r",0,255,r, 430, 50,256, 10) 7 label = rSlider.captionLabel (); label.sét( "red" 7 rSlider = controlps.addSlider() creates anew slider object named rSlider. Here is a breakdown of the parameters: +"r’— the name of the variable that will be changed by moving the slider (we declared the variable as an integer, near the top of the sketch) -0 — the beginning of the range of values for this slider (the red hue of a color can be any integer from 0 to 255, so this number is 0) +255 — the end of the range of values for this slider “Tr ~ this parameter is for the default value of the slider. We could have written a number here (e.g., 255), but since we declared the variable r with a default value of 255 earlier in the sketch, | am just calling r here. This way, if | want to change the default values, | can change them where | declare the variables, and not have to search through the code for where | create the sliders. -430 - the x position to begin drawing the slider +50 — the y position to begin drawing the slider Build Your Own 3D Sigil Generator Iyperritual +256 — the width (in pixels) of the slider. Since there are 256 values between 0 and 255, | am drawing the slider 256 values wide. +10 — the height (in pixels) of the slider. By default, the slider's label would be R (because of the ‘r’ at parameter), but that is not very descriptive, so | want to change that to RED. To do so, | create a new label and set it to “red”: label = rSlider.captionLabel (); label.set( "red" ); You can change other properties of the sliders, such as their background and foreground colors, fonts and fonts colors, etc. See the controlP5 reference documentation for more info. Adjusting the red, green, and blue sliders, changes the r, g, and b variable values, and so changes the color of the sigil as determined by this line in the sketch: sigil.stroke(color(r, g, b)): The toggle box is created similarly but has fewer parameters because it does not have a Tange of values. The toggle box has two states that map to the animate variable; itis either on (animation = true), of off (animation = false). Then when we draw the sigil, we check to see the status of animate, and if itis true, we increase the xRot, yRot. and zRot values according to the position of the speed slider (speedS1ider, associated with the variable, speed), thereby animating the sigil. PGraphics Last week, we saw how to draw in 3D using the P3D mode. Now, controlP5 comes with its ‘own font for drawing lables and such. Fonts work differently in P3D and OPENGL modes than that do in Processing's 2D modes, and if we try to draw controlPS objects onto a 3D canvas, the label fonts become distorted. To work around that, we are going to draw the sigil into a graphics buffer using PGraphics. and then display the sigil as an image on a 2D canvas. You do not need to install a new library to use PGraphics; it is part of the standard Processing code base. First, we declare a PGraphics object named sigill, near the beginning of our sketch: PGraphics sigil; Then in setup (), we create the sigil, object. Note that the mode of this object is P3D, but our sketch itself is not P3D (as it was last week); this will allow us to draw a 3D image ‘onto a 2D canvas. All of the statements for drawing the sigil are enclosed between sigil.beginDraw() and sigil.endDraw(). and begin with sigi1. , which tells Processing to draw into the Graphics buffer instead of directly onto the canvas. Finally, the contents of the graphics buffer are drawn to the canvas as an image (at position 0, 0): image(sigil, 0, 0)5 ‘As always, if you have questions or concems, please post on the forum, Next week I will show you how to create images and videos of the sigils we have created. 27 Build Your Own 3D Sigil Generator Iyperritual Week 6 For this final week in the course, we will lear how to save images and video files of our 3D sigils. save() The following sketch will draw a 3D sigil. Press the 1, 2, 3, 4, 5, or 6 key to rotate the sigil ‘one way or the other on its three axes. Press the 7 key to save a PNG file of the sigil. The file will be written with the name sigil.png, to your sketch's folder (look under the Sketch menu, Show Sketch Folder). You can change the file name or type within save(); allowable file types are TIFF (tif), TARGA (tga), JPEG (Jpg), and PNG (png) float [] xPos'= {-1,0/1,-1,0)2)<1,0,1,-140/1,-1,0,2,-1,0,1,-1,0,1,- 1,0,1,-1, 0)1)2 float[] yPos 1,0,0,0/1,1,1) float] /zPos = {-1,-1,-1,<1}-tyt1 “1-440 1,010) 0,0,010¢0e0/0/1,1/Tydy ed, 1,1, Ie char[] alphabet UAGOBN NCD Nt, BttQr, float(i{] sigilPos int multiplier = 1007 string word = "HYPERITUAL"; // change this to your own word Float xRot float yRot float 2Rot = 0 void setup() { size(400, 400, ‘P3D): noFill (V7 stroke (255) + smooth () 7 } void draw() { background (0} for(int i = 07/i/< wordslength(); i++); { for(int } = 0; j < alphabet-length; i+#) { {-1,-1yp 1 94 0,0,1,1,1,-1y 1, 71,0, 0,0, 1,141,-1,-1,- cont, IP, BS" 9 Th EGON new float [16] [3]; 28 Build Your Own 3D Sigil Generator Iyperritual if(word.charAt (i) == (alphabet [j])) { sigilPos[i][0] = xPos[j] * multiplier; sigilPos[i][1] = yPos[j] * multiplier; sigilPos[i][2] = 2Pos[j] * multiplier; } } i translate(width/2, height/2, 0); rotateXx (xRot) 7 rotateY (yRot) ; rotatez (zRot) 7 for(int i = 0; i < word.length()>= 17 itt) { line(sigilPos[i][0], sigilPos[il[1], sigilPos{i] [2], sigilPos[it1] [01, sigilPos[iti][1, sigitPosfit1112])7 } } void keyPressed() { Af (key == 4) { xRot —= 0.01; } else if (key == '2') xRot += 0.017 } else if (key—= 13") { yRot|-= 0.01; } else if (key = 14") 1 yRot += .0.01; } else if (key zRot == 0.01 } else if (key zRot #= 0.01; } else if(key.—— '7') { saye("sigil.png")? : saveFrame() Seay | 6) 4 Using saveFrame() will write a new image each time the 7 key is pressed, instead of overwriting a single image. Not very useful with the above sketch, but here is one that will ‘that will save 30 frames of animation when the 7 key is pressed. float [] xPos =-{71,0,1,-1,0,17-1,0,1,-1,071)-1,0,1)"1,0,1,"1,0,1,— 1,0,1,-1,0/1. float [] yPos = {-1,~ 1,0,0,0,1,1,1}+ float [] zPos = {-1,-1,-1,-1,-1,-1,-1)-1,- 1, 0,0, 0,0, 0, 0,0, 0,0, ly t¢tetyt, 1,4, 1, 1)5 char[] alphabet cat tor, po, 0/0/0,1,1,1,-1,22,-2)0,0,0;1,1,1,-1,-1,- float[]{] sigilpos = new float [16] [317 int multiplier - 1003 String word - "HYPERITUAL"; // change this to your own word float “Rot - 0; float yRot = 0; float zRot = 0; 29 Build Your Own 3D Sigil Generator Iyperritual boolean makeAnimationFiles = false; int counter = 0; void setup() { size (400, 400, P3D); noFill (); stroke (255) 7 smooth () } void draw() { background (0); for(int i = 0; i < word.length(); i++) { for(int j = 0; j < alphabet.length; j++), { if(word.charAt (i) == (alphabet (j])) 1 sigilPos[i][0] = xPos{j] * multiplier; sigilPos[i] [1], yPos{j] * multiplier; sigilPos [i] [2]/ = 2Pos[j]) * multiplier; t } } translate (width/2, height/2,\ 0); xRot += 0.017 Y yRot += 0.01; zRot| $= 0.01; rotatex(xRot) 7 rotateY (yRot) 7 rotatez(zRot); for(int i= 07 i < word.length() - 1; i++) { line (sigilPos[i][0], sigilPos[i][1], sigilPos[i] (21, sigilPos[itl1[0], sigilPos{it1][1], sigilPos[it11[21); } if (makeanimationFiles == true) { counter++; saveFrame("sigil"+counter+" png"); if (counter == 30) { makeAnimationFiles = falsey } } void keyPressed(){ if (key == '7') ( counter = 0; makeAnimationFiles = true; } I Build Your Own 3D Sigil Generator Iyperritual MakeMovie ‘The MakeMovie class is part of Processing’s standard video library, and can create a movie {.mov) file of the sigil. Using the following sketch as an example, press the 7 key to begin recording the movie, and the 8 key to stop recording. import processing.video.*; MovieMaker mm; // declare MovieMaker object float[] “Pos = {-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0/1,-1,0,1,-1,0,1,~ 1,0,1,-1,0,1}7 float [] yPos = {-1, 1,0,0,0,1,1, 11 float [] zPos = {-1,-2y-L,-1)-1,-1,-1,-1,> 1, 0,0, 0,0, 0,0, 0,0/0/1,1,441, ¥,1)1) V4) 5 char[] alphabet {1At, BY, Cyt ENE PGN NHS, "I" + 1H", 10", PEESOR fir CATER EEMAy OV" SWNT Ee float {][] sigilPos = new, float [161(31; int multiplier = 100; string word =\"HYPERTTUAL";:// change this to your own/word float, ¥Rot) float yRot float 2Rot = boolean makeMovieFile\= false; void setup() { sige (400, 400,-P3D); // create MovieMaker object with size, filename, // framerate, compression codec, and quality -1,0,0,0,1,1,1, +-1,0,0,0,1,1,1 mm\= new MovieMaker (this, width, height, "drawing.mov", 30, MovieMaker.H263, MovieMaker.HIGH) ; noFill(); stroke (255); smooth (); } void draw() { background (0); for(int i= 07/4 < word.length(); i++) { for(int 3 = 0; j

You might also like