diff options
Diffstat (limited to 'tutorial/tutorial.html')
-rw-r--r-- | tutorial/tutorial.html | 803 |
1 files changed, 0 insertions, 803 deletions
diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html deleted file mode 100644 index 421047b..0000000 --- a/tutorial/tutorial.html +++ /dev/null @@ -1,803 +0,0 @@ -<HTML> -<HEAD> - <STYLE type="text/css"> - H1 {color: maroon} - H2 {color: #007090} - H3 {color: #0050b0} - A.head {color: #0060a0} - </STYLE> -</HEAD> -<TITLE>XCircuit Tutorial Page</TITLE> -<BODY BACKGROUND=../giffiles/blpaper.gif> -<CENTER> -<A HREF=../xctitle.ps><IMG ALIGN=middle SRC=../xctitle.gif -ALT="The XCircuit Tutorial"></A> -<H1>The XCircuit Tutorial</H1> -</CENTER> -<HR> -<H2>Table of Contents</H2> -<UL> - <LI> <A HREF="#Download">Download</A> Download the tutorial - <LI> <A HREF="#Start">Getting Started</A> Introduction - <LI> <A HREF="#Task1">Task 1</A> Running XCircuit - <LI> <A HREF="#Task2">Task 2</A> Change an option from the menu - <LI> <A HREF="#Task3">Task 3</A> Draw a line - <LI> <A HREF="#Task4">Task 4</A> Move an object - <LI> <A HREF="#Task5">Task 5</A> Change the properties of a polygon - <LI> <A HREF="#Task6">Task 6</A> Change the page - <LI> <A HREF="#Task7">Task 7</A> Select an object from the user library - <LI> <A HREF="#Task8">Task 8</A> Use a keyboard macro to create an arc - <LI> <A HREF="#Task9">Task 9</A> Zooming and panning - <LI> <A HREF="#Task10">Task 10</A> Selection of multiple objects - <LI> <A HREF="#Task11">Task 11</A> Saving a file - <LI> <A HREF="#Task12">Task 12</A> Loading a file - <LI> <A HREF="#Task13">Task 13</A> Entering Text - <LI> <A HREF="#Task14">Task 14</A> Making curves and paths - <LI> <A HREF="#Task15">Task 15</A> Dealing with over/under arrangement of elements - <LI> <A HREF="#Task16">Task 16</A> Making user-defined objects - <LI> <A HREF="#Task17">Task 17</A> Editing objects and elements - <LI> <A HREF="#Task18">Task 18</A> Generating complex geometric shapes - <LI> <A HREF="#Task19">Task 19</A> Investigating other <B>xcircuit</B> commands - <LI> <A HREF=tutorial2.html>Schematic Capture Tutorial</A> - <LI> <A HREF=../features.html><B>xcircuit</B> list of features</A> - <LI> <A HREF=../trouble.html>Troubleshooting <B>xcircuit</B></A> -</UL> - -<H2><A NAME="Download">Download</A></H2> - -This download is the tar'd image of everything in the tutorial subdirectory, -including both the standard tutorial and the schematic capture tutorial. -Note that when untar'd, this will expand into a directory tree with top-level -directory named "tutorial". <P> - -<BLOCKQUOTE> - <BLOCKQUOTE> - <TABLE border="1" frame="box" rules="none" width="90%" cellspacing="0" - cellpadding="5" bgcolor="#ffffcc"> - <TBODY> - <TR> - <TD> File </TD> <TD> Revision </TD> <TD> Size </TD> <TD> Date </TD> - </TR> - <TR> - <TD> <A HREF=../tutorial.tar.gz>tutorial.tar.gz</A> </TD> - <TD> 1 </TD> - <TD> (432KB) </TD> - <TD> January 28, 2003 </TD> - </TR> - </TBODY> - </TABLE> - </BLOCKQUOTE> -</BLOCKQUOTE> - -<H2><A NAME="Start">Getting started</A></H2> -Welcome to xcircuit, the circuit drawing program by Tim Edwards. In order to -get the most out of this page, you should have already downloaded, compiled, -and installed the xcircuit program and its libraries. <P> - -<H3><A NAME="Task1">Task 1: Run the program</A></H3> -First, start xcircuit without any parameters: <TT>xcircuit</TT> <P> - -<IMG SRC=giffiles/tut1.gif><P> -The features of the xcircuit window are as follows: -<OL> - <LI> Along the top of the screen are buttons for pull-down menus called "File", - "Edit", "Text", "Options", and "Window". - <LI> At the top, beside the menu buttons, is a welcome message in the message - window telling you the version number of the program (Version 2.0). - <LI> On the bottom left is a message window telling you that you are currently - editing "Page 1". - <LI> On the rest of the bottom is a message window telling you that xcircuit - has just loaded the library "/usr/local/lib/xcircuit/builtins.lps" (this - may be in a different directory if xcircuit has not been installed in the - default directories). This message will disappear after about 10 seconds. - <LI> At the left and along the bottom are two <B>scrollbars</B> which report the - position of the drawing relative to the main window, and can be used - to reposition the drawing by clicking on the bar with any mouse button. - <I>Note:</I> Due to the length of time necessary to refresh the drawing - window, the scrollbars cannot be "dragged". - <LI> In the center is a white <B>drawing area</B> with lightly-colored grid and - axis lines. -</OL> -There are two types of mouse button-pushing used in xcircuit. When a button -is pushed and released quickly, I will call it <B>"tapping"</B>. When a button -is pushed and held down, I will call it a <B>"pressing"</B>. Since pressing -a button is usually performed in order to move objects around on the screen, -I will sometimes refer to it as <B>"dragging"</B> the object. <P> -<I>Note:</I> Xcircuit does <B>not</B> use double-clicking. - -<H3><A NAME="Task2">Task 2: Change an option from the menu</A></H3> -Acquaint yourself with the arrangement of menu buttons and pulldown menus. -<OL> - <LI> Press the button labeled "Options" with <B>mouse button 1</B> and hold down - the button while you drag the cursor around with the mouse. - <LI> Keeping the mouse button pressed down, move down to the "Elements" button. - Each button will highlight as you pass through it. - <LI> Put the cursor on top of the arrow icon at the right side of the "Elements" - button. You should see a secondary menu titled "Elements" pop up. The - title is the topmost entry of the menu. It has no function and does not - highlight when the cursor is overtop it. - <LI> Keep moving down to the "Color" button and again move the cursor over - the arrow icon. The third and final menu of colors will pop up. Note - that one item, "Inherit Color" has a check mark on it. The check mark - denotes that this entry is the <I>current default color</I>. - <LI> Move down to the purple color button and release the mouse button there. - The menus will disappear. You have just changed the default drawing - color to purple. - <LI> Repeat the procedure up to step 4. When you enter the "color" menu you - will see that the purple color button is now checked, showing that - purple is the default drawing color. -</OL> -Throughout the tutorial I will refer to the menu items using the pulldown -hierarchy, with an arrow ("->") wherever you need to go to a submenu. So -the "Inherit Color" menu item would be referred to as -"Options->Elements->Color->Inherit Color". - -<H3><A NAME="Task3">Task 3: Draw a line</A></H3> -Now that you understand the function of the menu buttons, it's time to learn -how to draw something. The simplest and most common thing to draw in xcircuit -is a polygon. -<OL> - <LI> Tap <B>mouse button 1</B> anywhere in the drawing area and release it - immediately. If you wait too long to release the button, xcircuit will - interpret it as trying to "grab" an element on the screen, and nothing - will happen (because there aren't any elements yet to grab). - <LI> Move the cursor around the screen. A purple line (because you chose - purple to be the default color in Task 2) will appear between the - origin point and will track with the cursor. - <LI> Tap <B>mouse button 1</B> again to finish a line segment. A new line - will begin at the point the first one left off. Do this several times - to form a polygon. Finish the polygon by tapping <B>mouse button 2</B>. - <LI> Repeat steps 1 through 3 but finish by tapping <B>mouse button 3</B>. - The line you have just created will disappear. You have just - <B>cancelled</B> the operation. -</OL> - -<IMG SRC=giffiles/poly1.gif ALIGN=CENTER> A purple polygon <P> - -For most operations in xcircuit, tapping <B>mouse button 1</B> will begin or -continue an operation, tapping <B>mouse button 2</B> will finish it, and -tapping <B>mouse button 3</B> will cancel it. The behavior can be slightly -different depending on the circumstance, and the behavior for <B>pressing</B> -buttons 1 and 2 is very different, as demonstrated in Tasks 4 and 5. - -<H3><A NAME="Task4">Task 4: Move an object</A></H3> -<B>mouse button 1</B> does have one very different function than that described -in the last task. It can be used to "grab" hold of an object for moving. -<OL> - <LI> Press <B>mouse button 1</B> close to a line of the polygon you just - drew. Hold down the button. The line should turn gold colored, - indicating that it has been "selected". If instead nothing happens, - then the cursor is too far away from the line. Releasing the button - releases the object. - <LI> Try grabbing and releasing the polygon from different distances to get - a feel for how close you must be to the object in order to grab it. - <LI> Now grab the polygon, and with the mouse button held down, move the - cursor across the screen. The polygon will follow the cursor. This - is how you move an object in xcircuit. -</OL> - -<H3><A NAME="Task5">Task 5: Change the properties of a polygon</A></H3> -<B>mouse button 2</B> also has a selection funtion; in fact, it has two of -them. In the normal drawing mode, it can be used to select objects for editing -or changing properties. In this task you will use <B>mouse button 2</B> to -select the polygon you just created in order to make it a dashed line. -<OL> - <LI> Select the object by tapping <B>mouse button 2</B> with the cursor near - to the object. The object will turn gold, indicating that it has been - selected. - <LI> Tap <B>mouse button 3</B>, and the selection will be canceled. - <LI> Investigate the other form of selection by pressing <B>mouse button 2</B> - starting below and to the left of the polygon, and dragging the cursor - to the top and right of the polygon. A green box will follow the - movement of the cursor. - <LI> When the box completely surrounds <I>at least one</I> of the endpoints - of any line segment of the polygon, release the button. The polygon - should be selected. - <LI> Click <B>mouse button 3</B> to deselect the object. - <LI> Repeat steps 3 through 5, noting that if no endpoint of the polygon - is contained within the <B>select box</B>, then the polygon will not - be selected. - <LI> Select the polygon but do not deselect it. - <LI> Go to the "Options->Elements->Border" submenu and select option - "Dashed". When you release the button, the polygon will be drawn - in dashed lines, and it will no longer be selected. - <LI> Experiment with the different Colors, Fill-styles, and Border-styles - available in the menus. Some of the many varieties are shown below. -</OL> - -<IMG SRC=giffiles/poly2.gif ALIGN=TOP> More purple polygons. <BR> Top left: original. - Top right: dashed. <BR> Center left: closed. Center right: stippled - (50% stipple). <BR> Bottom left: opaque stippled. Bottom right: - filled solid. <P> - -<H3><A NAME="Task6">Task 6: Change the page</A></H3> -Xcircuit has multiple pages. There are two ways to change the current -drawing page, from a keyboard macro convenience function, or from the -menu. -<OL> - <LI> Select the menu item "Window->Goto Page->Page 2". The polygon - you just drew on Page 1 will disappear, and you will be on a - clean page, with the bottom left-hand window saying that you - are editing "Page 2". - <LI> Go back to Page 1 using the keyboard macro: With the cursor - in the drawing area, press the "1" key. You will be back on - page one. - <LI> Keys "1" through "9" and "0" will get you instantly to pages - 1 through 10, respectively. - <LI> End this task on Page 2, which is currently empty. -</OL> - -<H3><A NAME="Task7">Task 7: Select an object from the user library</A></H3> -Another common task in xcircuit is to grab an object from the object -library and place it on the drawing. -<OL> - <LI> Select the "Window->Show Library" button from the menu, or press the - "l" (that's "ell" as in "library") key in the drawing window. Note - that the menu button has - "(l)" written after "Show Library", indicating that the <B>keyboard - macro</B> "l" has the same function as the menu button. Generally, - keyboard macros, once memorized, are more convenient to use than - their menu button counterparts. Almost always, the letter or symbol - used for the macro is meaningful and easy to remember (like "a" for - "arc", "s" for "spline", "p" for "pan", "c" for "copy", etc.). - <LI> A page will appear, showing a number of circuit objects in the - built-in object library. - <LI> Grab one object by moving the cursor over top it and pressing and - holding <B>mouse button 1</B>. As soon as the button is pressed, - the object library will disappear, and you will be dragging the - object around Page 2, from which you called up the library. When - you release the button, the object will be deselected. Place it - away from the polygon you drew in the previous tasks. - <LI> Select the object by tapping on it with <B>mouse button 2</B>. - Try changing the border style to dashed. You will see that - nothing happens. This is because object instances from the - library are <I>made up of</I> basic elements like polygons, - arcs, and splines, but they are <B>composite</B> objects which - do not have properties like "Fill-style" and "Border-style". - However, object instances do have the property of color, and - also the property "size" which simple elements like the polygon - do not have. - <LI> Select the object again (if you have not already done so), and - then select the menu item "Options->Elements->Object Size". - <LI> A window will pop up asking you for an object size. Place the - cursor somewhere inside the popup window and change the default - size of "1.00" to "1.5". - <LI> Press the "Okay" button. The popup window will disappear and - the object will now be 1.5 times its original size (that is - to say, its length and width will each be 1.5 times their - previous value). -</OL> - -<CENTER> -<IMG SRC=giffiles/lib1.gif> <BR>Part of the default circuits built-in library. <P> -</CENTER> - -<H3><A NAME="Task8">Task 8: Use a keyboard macro to create an arc</A></H3> -As mentioned above, keyboard macros are generally easier to use than -their menu-button counterparts. You will create an arc in both fashions -to show the difference. -<OL> - <LI> Select the menu item "Edit->Make Arc". - <LI> The information window at the bottom will say "Click button 1 - and drag to create arc". - <LI> Place the cursor where you want the arc center to be and press it. - While holding it down, drag the cursor around the screen. An arc - will follow the cursor. - <LI> Release the mouse button. You will now be editing the angle of the - first endpoint. If you just want a circle, tap <B>mouse button 2</B> - to end. If you keep pressing <B>mouse button 1</B>, you will be - able to edit, in turn, all the properties of the arc such as - endpoint positions and ellipse axis. - <LI> Now, create an arc by tapping the "a" key while the cursor is in the - drawing area. The main difference is that <B>mouse button 1</B> is - not held down while you form the radius of the arc. Otherwise, - the arc can be edited as before. -</OL> - -<IMG SRC=giffiles/arcs1.gif ALIGN=TOP> Some differenct arcs. - <BR> Top left: linewidth of 1.5, first endpoint at 90 degrees. - Top right: closed arc. - <BR> Bottom left: red circle. - Bottom right: blue ellipse. <P> - -<H3><A NAME="Task9">Task 9: Zooming and panning</A></H3> -<OL> - <LI> Pan the screen to be centered on the arc by placing the cursor close to - the center of the arc and tapping the "p" key. - <LI> Pan the screen by selecting menu item "Window->Center Pan" and then - tapping <B>mouse button 1</B> on the point of the drawing area that - you want to be the new center of the screen. - <LI> Tap the "Z" and "z" keys to zoom in and out, or select the menu items - "Window->Zoom In" and "Window->Zoom Out". Note how the scrollbars - on the side and bottom of the screen change with the scale of the - drawing. - <LI> Pan the screen by tapping any mouse button on either of the scrollbars. - Note how this function is similar to the "Pan" function. - <LI> Zoom to a selected area of the screen by making a green selection box - like you did in Task 5, step 3. However, instead of releasing the - button in order to make the selection, type the "Z" key while the - mouse button is still pressed down. The screen area will zoom to - the area of the green box. - <LI> Alternately, choose "Window->Zoom Box" from the menu. Then press - any mouse button and drag to generate the green selection box. When - the button is released, the screen area will zoom to the area of the - green box. -</OL> - -<H3><A NAME="Task10">Task 10: Selection of multiple objects</A></H3> -<OL> - <LI> Clear the current page by choosing the menu item "File->Clear Page". - There is no keyboard macro for this command, to prevent accidental - erasure of the screen (which cannot be undeleted). - <LI> Grab several objects from the library (see Task 7) and place them - on top of each other in the middle of the page. - <LI> Decide on one object which you will move, leaving the others where - they are. - <LI> Now press <B>mouse button 1</B> as if you were going to select the - object you want to move. Because the command is ambiguous---the - program doesn't know which one or ones of the objects you really - want to select---the program will query you one by one for which - objects you want to select. - <LI> One object will turn blue, the cursor will become a question mark, - and the information bar at the bottom will read, for example, - "Click to accetp/reject: 1 of 3" if the program found three - objects under the cursor. Release the mouse button at this - point. - <LI> If the object that you want to select and move is colored blue, - click <B>mouse button 2</B>. If an object that you <I>don't</I> - want to select and move is colored blue, click <B>mouse button - 3</B>. - <LI> When you have chosen or rejected each of the objects, the cursor - will become a circle. You may now press and hold <B>mouse button - 1</B> and continue with the intended move. - <LI> Try this several times to get used to it. -</OL> - -<CENTER> -<IMG SRC=giffiles/select1.gif> <BR> Three objects simultaneously selected. <BR> </CENTER> - The gold-colored gate has already been selected; the program is now prompting - the user for confirmation to add the blue-colored object to the selection. <P> -<CENTER> -<IMG SRC=giffiles/select2.gif> <BR> Message window when selecting multiple objects. -</CENTER><P> - -<H3><A NAME="Task11">Task 11: Saving a file</A></H3> -Since the main purpose of xcircuit is to create publishable-quality picutures, -it is necessary to understand a little bit about the PostScript output which -it writes. First I will show you how to save and load a file. - -<OL> - <LI> Choose a page which you have been drawing on, or create a drawing to - save. - <LI> Select the menu item "File->Write Xcircuit PS". You will get a popup - window that looks like the figure below. <BR> - <IMG SRC=giffiles/save1.gif ALIGN=CENTER><BR>The file properties popup window. - <LI> If you tap the button labeled "Write". You will get a message in the - bottom message window saying "Warning: Enter a new name". Nothing - has been written at this point. - <LI> Change the filename. Move the cursor over the window containing the - filename. Delete the current file name and type in a new one. - When you are done, either hit the <TT>RETURN</TT> key or tap the - button labeled "Okay" (both actions have the same effect). - <LI> <I>Important note:</I> If the name has <B>no</B> extension, an - extension "<TT>.ps</TT>" will automatically be added when the file - is written. If an extension, for instance "<TT>.eps</TT>", is written - in the filename, then it will be used. - <LI> When you change the filename, the page label will be changed to - match the filename, and the bottom left-hand message window will - now say "Editing: " followed by the page label name, followed by - the page number in parentheses. <BR> - <IMG SRC=giffiles/save2.gif ALIGN=CENTER><BR>Changes to scale and filename. - <LI> If the filename you chose already exists on the disk, the button - which previously was labeled "Write File" will now say "Overwrite - File", the computer will beep, and the bottom message window will - say "Warning: File exists". - <LI> Tap the button labeled "Close". The window disappears; because - you did not tap the "Write File" button, nothing was written, - although the filename change has been registered. - <LI> Select "File->Write Xcircuit PS" again to bring the window back. - This time, tap the "Write File" button. The file will be written - to the disk current directory, and the button which previously - said "Close" will now say "Done". - <LI> The file which has just been saved is already in a PostScript format. - You may view it with any PostScript previewer (ghostview is recommended). -</OL> - -<H3><A NAME="Task12">Task 12: Loading a file</A></H3> - -<OL> - <LI> Go to a new, unused page. - <LI> Select menu item "File->Read Xcircuit PS". You will get a screen that - looks something like the following: <BR> - <IMG SRC=giffiles/load1.gif ALIGN=CENTER> The load-file popup window. - <LI> If the file list is larger than the window, you may scroll up and down - the list by clicking <B>mouse button 1</B> or <B>2</B> on the - <B>scrollbar</B> at the right side of the window and dragging it up - and down. - <LI> A green box will be drawn around each filename as your cursor passes - over it. - <LI> Find the file that you just saved in the last task. When the green - box is over this filename, tap <B>mouse button 1</B>. The filename - will turn green, and at the same time will be copied into the - text edit box. - <LI> Tap the "Okay" button to load the file. - <LI> If you do not wish to use the scrolling menu, you may type the filename, - with or without the "<TT>.ps</TT>" extension, in the text edit box, - followed by the <TT>RETURN</TT> key or tapping the "Okay" button. - <LI> Selecting a directory name in the file list box, including "../" for - the directory one level up, will go to that directory. Entering a - directory name in the text edit box followed by the <TT>RETURN</TT> - key will also go to that directory. - <LI> If you know where the <B>xcircuit</B> source is kept, then select the - "File->Read Xcircuit PS", go to the source directory, go to the - "examples" directory, and load one of the example files, such as - "<TT>vcoblock.ps</TT>". -</OL> - -<H3><A NAME="Task13">Task 13: Entering Text</A></H3> -Xcircuit has a very complicated interface for entering text, which allows -you to change fonts and font styles within a string, make overlines and -underlines, and subscripts and superscripts. <P> - -<OL> - <LI> Go to a new, unused page. - <LI> Let's say you want to type in a fairly complicated expression, like <BR> - "f(x) = sin(2*pi*omega_c*t)" (except with Greek letters, of course). - <LI> If you've read your TeX manual thoroughly, and understand all the finer - points of mathematical equation typesetting (if you haven't, you should), - then you know that all the variables should be in italic type. - <LI> Select menu item "Text->Style->Italic". The default text font is now - italic style. - <LI> Select menu item "Text->Font->Times Roman" if it is not checked already. - The default text font is now Times Italic (Times font + Italic style). - <LI> Select menu item "Text->Make Label" and click on <B>mouse button 1</B> - anywhere in the drawing area. - <LI> Alternately, you can just tap the "<TT>t</TT>" key in the drawing area. - <LI> The green line marks the pointer position, and the "x" marks the - origin (justification) of the text. - <LI> Select menu item "Text->Justification->Middle Justified". You will - see the green "x" move to the center of the line, showing that the - text is vertically centered on its point of origin. - <LI> Alternately, you could type keypad key "6" (on some systems, - Shift-keypad 6) to get center-left justified text. - <LI> Type "<TT>f</TT>". In the bottom message window, the letter "f" and a vertical - bar "|" appear, showing what's in the string relative to the text - cursor. - <LI> Select menu item "Text->Insert->1/4 Space". This is the proper thing to - do for "italic correction", an extra bit of space necessary after an - italic character followed by an upright character, particularly tall - ones such as "f" and "t" which lean leans rather far to the right of - their character bounding boxes. - <LI> Select menu item "Text->Style->Normal". - <LI> Type "<TT>(</TT>" - <LI> Select menu item "Text->Style->Italic". - <LI> Type "<TT>x</TT>" - <LI> Select menu item "Text->Style->Normal". - <LI> Type "<TT>) = sin(2</TT>" - <LI> Select menu item "Text->Style->Italic". - <LI> Select menu item "Text->Font->Symbol". - <LI> Type "\". A page with the 256 character encodings for the - Symbol font will appear, replacing the current page, as - shown in the figure below.<BR> - <CENTER><IMG SRC=giffiles/symbol_enc.gif></CENTER> - <LI> Click on the "pi" symbol. The screen will immediately - return to the original page, with the "pi" added to the - text line. - <LI> Type "\", then click on the "omega" symbol in the encoding - vector. - <LI> Select menu item "Text->Font->Times-Roman" - <LI> Select menu item "Text->Style->Subscript" (or keypad-minus) - <LI> Type "<TT>c</TT>" - <LI> Select menu item "Text->Style->Normalscript" (or keypad-enter) - <LI> Type "<TT>t</TT>" - <LI> Select menu item "Text->Insert->1/4 Space" for another italic - correction. - <LI> Select menu item "Text->Style->Normal". - <LI> Type "<TT>)</TT>" - <LI> Before typing <TT><RETURN></TT> to complete the text, use - the left- and right-arrow keys to move the cursor around inside - the text string. Note how font- and style- changing commands - embedded in the text string can be seen in the message window. - Their position relative to the text cursor is important when - anticipating the effect of deleting (<TT><DELETE></TT> key) - a text command. - <LI> Yes, this is very complicated, but it is also very powerful. -</OL> - -<CENTER><IMG SRC=giffiles/text.gif></CENTER><BR> -Above: The text figure created in the task.<BR> -Below: The <A HREF=psfiles/test1.ps>PostScript output</A> of the same text from xcircuit. -<CENTER><IMG SRC=giffiles/text2.gif></CENTER><BR><BR> - -<I>Typographical Note:</I> ISO-Latin1 encodings define the Greek character "mu" -(µ) to be used for the symbol "micro", which naturally is used often in -circuit schematics. This differs from the Symbol font "mu" in that it matches -the style and properties of the font in which it is defined. Thus, it is -possible to get a Helvetica "mu", a Times-BoldItalic "mu", etc., something -which is virtually impossible to do even in LaTeX<A HREF=footnote.html>(*)</A>. -Due to the font size and style matching, this is always preferable to the -Symbol font "mu". To get the ISO-Latin1 "mu" character, (while entering or -editing text) choose <I>Text->Encoding->ISO-Latin1</I> from the menu, then -either choose <I>Text->Insert->Character</I> or type "\" at the text cursor, -then select the "mu" character from the character array. - -<H3><A NAME="Task14">Task 14: Making curves and paths</A></H3> -Curve drawing is a useful feature of most capable drawing programs. The -concept of <I>paths</I> is a powerful aspect of PostScript which is not -usually found elsewhere. Path definitions are used to create a single -entity out of a string of curves, arc segments, and lines. The resulting -entity has its own color, fill styles, and border styles. - -<OL> - <LI> Go to a new, unused page. - <LI> Type "s" to start a curve (you can think of "s" as standing for - "spline", although these are Bezier curves, not splines, or you - can just think of the curvy "s" shape. The key "c" is reserved - for copying). The first thing you will see is two dotted lines - ending in little "x" marks. These are the curve control points. - <LI> Move the cursor around. Right now you are positioning the - end of the curve but have no control over the control points.<BR> - <IMG SRC=giffiles/spline1.gif> - <LI> Place the curve endpoint. If you are satisfied with the shape - of this curve, you can tap <B>mouse button 2</B> to finish - the curve and quit. However, we'll say that you have more to - do to this curve, so tap <B>mouse button 1</B> instead. - <LI> You get a message saying "Adjust control point", and the cursor - moves overtop the nearest "x" mark. Now when you move the - cursor, you change the shape of the curve. - <LI> Move the control point two grid blocks to the left of where it - started (make the control line horizontal with a length of - 4 grid blocks). <BR> - <IMG SRC=giffiles/spline2.gif> - <LI> Click <B>mouse button 2</B> to finish the curve. - <LI> Now we will make a simple path. But it takes more than one element - to form a path. Put the cursor over the curve and tap the "c" - key. - <LI> When you move the cursor, a copy of the curve will follow you. - <LI> While you are dragging the curve copy, flip it by tapping the - "f" key and then the "F" key (one horizontal plus one vertical - flip). - <LI> Place the curve with its endpoints overtop the original curve. - The result should look like the figure below. - <LI> Select both curves by tapping <B>mouse button 2</B> on top of - each one, or by forming a selection box (see Task 5). - <LI> Tap the "j" key in order to "join" the two curves into a single - path. - <LI> If you now move or select the path, you will find that both - curves act as a single entity. - <LI> Select the path and then select menu item - "Options->Elements->Fill->(black box)". The path will then - become solid black. If you color it blue, it will look something - like the right side of the figure below. -</OL> - -<CENTER><IMG SRC=giffiles/spline3.gif></CENTER><BR> -Curves and paths. Left: The curve has been copied and flipped. -Center: The two curves are placed together and joined into a path. -Right: The path is filled and colored as a single entity. - -<H3><A NAME="Task15">Task 15: Dealing with over/under arrangement of elements</A></H3> - -<OL> - <LI> Clear the current page (menu option "File->Clear Page") or go - to a new, unused page. - <LI> Start a <B>box</B> with the "b" key (this is a convenience for - drawing rectangles and squares). - <LI> Click <B>mouse button 2</B> to finish the box. - <LI> Select the box and choose menu item - "Options->Elements->Fill->(black box)", where the "black box" - is the first menu item in the list. You will now have a black - box. (note that to select the box, the cursor must be near the - <B>edge</B> of the box, not in the middle). - <LI> Select the box again and choose menu item - "Options->Elements->Color->(orange box)". You will now have - a solid, orange box. - <LI> Go to the built-in library ("l" key) and bring back a circuit - object (say, a "nand" gate). - <LI> Place the gate on top of the orange box. - <LI> Make a copy the box ("c" key) and place it beside the first. - <B>mouse button 2</B> ends the copy command. - <LI> You will notice that the library object suddenly disappeared. - This is because the "copy" command moved the orange box - to the end of the drawing list. Because it is drawn <B>after</B> - the library object, the library object is hidden underneath. - <LI> To get the library object on top again, select everything in the - area of the orange box by forming a selection box around the - orange box (<B>mouse button 2</B>). Tap the "X" key (Shift-X) - to <B>exchange</B> the drawing order of the two elements. The - library object will now be visible on top of the orange box. -</OL> - -<CENTER><IMG SRC=giffiles/overunder.gif><BR> -Over- and Under- arrangements of elements. </CENTER> - -<H3><A NAME="Task16">Task 16: Making user-defined objects</A></H3> -One of the most powerful aspects of xcircuit is its ability to deal with -objects on a hierarchical level. Circuits in particular are highly -structured. Often it is desirable to draw a subcircuit and use it -several times. It is much more efficient to draw the subcircuit and -create a <B>user object</B> from it rather than to copy all the -separate elements of the subcircuit every time you want a copy. -This is also true of new circuit components. <P> - -Say we wish to create a new circuit component, a <B>dependent current -source</B>. - -<OL> - <LI> Clear the current page or go to a new page. - <LI> We want the dependent current source to look something like the - independent current source (isource) in the builtin library file. - Go to the library and bring back an "isource" object for reference. - <LI> Draw a polygon, as in Task 3. Make it diamond-shaped and three - grid spaces high, two wide (see the figure below). - <LI> Add a line of height one-half-grid space on the top and bottom - of the diamond. - <LI> Now we will do something unusual. We will grab the arrow from - inside the isource object. Edit the original "isource" object - by placing the cursor over it and typing the ">" key (push - object). The page you were on will disappear, and you will - see only the object "isource". - <LI> Using the multiple-selection mechanism described in Task 10, - select the arrowhead and line in the middle of "isource", but - not the surrounding object. - <LI> Make a copy of these two elements with the "c" key. - <LI> While still dragging around the copy of the arrow, return to - the main page by typing the "<" key (pop object). You will - be returned to the original drawing, still dragging the arrow - with you. - <LI> Place the arrow inside the diamond. - <LI> Using a selection box, select all of the components of the - "dependent current source" object you have just constructed. - <LI> Type the "m" key to make the object out of the selected - components. - <LI> You will get a popup box asking for a name for the object. - Type something obvious like "depsource" or "disource". - Spaces are not allowed (if you use them, they will be - converted to underscores). - <LI> Tap the "Okay" button. Now, if you click on the dependent - source, it will be treated just like one of the builtin - objects. - <LI> Type the "L" key to go to the <B>User Library</B>. You - will see that the new object you created is now located - there. You can click on it to bring back another copy, - just like the builtin objects. -</OL> - -<CENTER><IMG SRC=giffiles/object.gif><BR> -Steps in creating a new user-defined object. </CENTER> - -<H3><A NAME="Task17">Task 17: Editing objects and elements </A></H3> -You briefly edited the built-in "isource" object in the last task, -but did not change anything. In this task, suppose we want to change -the appearance of the "dependent current source" object we made in -the previous task. - -<OL> - <LI> To edit the object, "push" into it using the ">" key, - as you did for the "isource" in the last task. - <LI> Make the polygon shorter. Put the cursor close to the - top of the diamond and type "e" for "edit". - <LI> Use the multiple-selection mechanism to select only the - diamond. - <LI> Now you will be editing the point position. Move the - point down one-half grid space, and tap <B>mouse - button 2</B> to complete the edit. - <LI> Do the same for the bottom point. Where the two ends of - the polygon meet, you will need to adjust both of the - points. - <LI> Extend the lines on the top and bottom to meet the - diamond by editing the endpoints just like you did for - the diamond. - <LI> When you are done, return to the main page by "popping" - out of the object page, using the "<" key. -</OL> - -<CENTER><IMG SRC=giffiles/objedit.gif><BR> -Steps in editing the user-defined object. </CENTER> - -<H3><A NAME="Task18">Task 18: Generating complex geometric shapes</A></H3> -This can be an incredibly useful feature for general drawing. A -wholesale use of it is necessary to create such extravaganzas as -this rendition of the -<A HREF=http://bach.ece.jhu.edu/~tim/pictures/apl_logo3.ps>JHU Applied -Physics Lab's logo</A>. I have made use of something in PostScript -known as a ``path,'' that is, a linked set of lines, arcs, and splines -which together form the boundary of a single object which can be -bordered, filled, colored, etc. In this task, I will show you how -to generate a picture of a solid cylinder, by making a path consisting -of both ellipses and lines. - -<OL> - <LI> Start with a clean page. - <LI> Create an ellipse as follows: - <OL> - <LI> Type macro <B>a</B> to start an arc. - <LI> Drag the arc out to some desired size. - <LI> Click the first mouse button three times (to bypass endpoint - editing and go to ellipse axis editing). The position of - the cursor will move from the side of the circle to the top. - <LI> Drag the ellipse minor axis to the desired size and click - the second mouse button to end. - </OL> </LI> - - <CENTER><IMG SRC=giffiles/path1.gif><BR> - Creating a path object (solid cylinder): top ellipse. </CENTER> - - <LI> The whole ellipse becomes the top of the "cylinder". To make the - bottom of the cylinder: - <OL> - <LI> Copy the first arc and place it well below the first. - <LI> Type macro <B>e</B> to edit (or select edit from the menu - and click on the lower ellipse). - <LI> Immediately type <B>e</B> again or click on the first mouse - button to go to endpoint editing mode. - <LI> Drag the endpoint around to the other side until the - result is the bottom half of an ellipse. Click the - second mouse button to finish. - </OL> </LI> - - <CENTER><IMG SRC=giffiles/path2.gif><BR> - Creating a path object (solid cylinder): bottom (half) ellipse. </CENTER> - - <LI> Draw two lines to create the sides of the cylinder. - <LI> Select the bottom and sides of the cylinder, and type the <B>j</B> key - to "join" these segments into a single "path". - <LI> Select everything. If you (individually) select any component of the - path (either the side lines or the bottom ellipse), the whole path - will be highlighted. - - <LI> Copy (with the <B>c</B> macro) and place the copy to the side. </LI> - - <CENTER><IMG SRC=giffiles/path3.gif><BR> - Creating a path object (solid cylinder): Two cylinder frames. </CENTER> - - <LI> Select the path (lower part) of the rightmost cylinder. - <LI> Choose menu item "Options->Elements->Fill->(black box)". Now - you can see how to create arbitrary filled shapes. </LI> - - <CENTER><IMG SRC=giffiles/path4.gif><BR> - Creating a path object (solid cylinder): Two cylinders, the right one - consisting of a filled path. </CENTER> - - <LI> Finish the cylinder in the following manner: - <OL> - <LI> Color the path shape dark gray. - <LI> Select the ellipse located above the colored cylinder and - perform the same steps to make it filled solid and colored - light gray. - <LI> Use the <B>X</B> keyboard macro to correctly arrange the - elements, with the light gray ellipse on top of the dark - gray path object. - <LI> Place the black wire frame cylinder on the left on top of - the solid cylinder on the right. <I>Hint:</I> Move the - wire frame halfway on top of the solid cylinder, then - arrange the top-to-bottom order of the elements so - that the wire frame ends up on top, then move the - wire frame the rest of the way. - </OL> -</OL> - -<CENTER><IMG SRC=giffiles/path5.gif><BR> -Creating a path object (solid cylinder): Finished cylinder. </CENTER> - - -<H3><A NAME="Task19">Task 19: Investigating other <B>xcircuit</B> commands</A></H3> -By now you should understand the basic user interface of xcircuit and be able -to get around the menus, the drawing area, be able to handle the popup -prompting windows, load and save files, write text, and create polygons, -arcs, curves, paths, and user objects. Of course, we have just touched -the surface of <B>xcircuit</B> capabilities. The list of features below -will help you find out all the things that can be done with the program. <P> - -For help with remembering keyboard macros and their functions, select the -menu item "Options->Help!". You will get a popup window to the right of -the screen which lists all of the available keyboard functions. Tap the -"Done" bottom at the bottom when you no longer need the help menu. <P> - -<HR> -<P><A HREF=../welcome.html><IMG ALIGN=middle SRC=../giffiles/bluebutton.gif - BORDER=0></A> Back to the xcircuit home page. . . -<P><IMG SRC=../giffiles/line1.gif><P> -email: <I>tim@bach.ece.jhu.edu</I> -</BODY> -</HTML> |