Viewing tip
I recommend that you open another copy of this document in a separate browser window and use the following links to easily find and view the figuresand listings while you are reading about them.
Figures
- Figure 1 . Mirror image from the file named Svg21a1r.svg.
- Figure 2 . Non-mirror-image version of the image from the file named Svg21a1r.svg.
Listings
- Listing 1 . Raw SVG code for Figure 2.
- Listing 2 . Beginning of the program named Svg21a.java.
- Listing 3 . Create a drawing canvas.
- Listing 4 . SVG code to create a canvas.
- Listing 5 . Draw a rectangular border on the canvas.
- Listing 6 . SVG code to draw a rectangle.
- Listing 7 . Draw the floor and the wall.
- Listing 8 . SVG code to draw a line.
- Listing 9 . Draw more rectangles.
- Listing 10 . SVG code to draw more rectangles.
- Listing 11 . Draw a polygon.
- Listing 12 . SVG code to draw a polygon.
- Listing 13 . Draw the rectangular pulley support.
- Listing 14 . Draw a circle.
- Listing 15 . SVG code to draw a circle.
- Listing 16 . Draw more lines.
- Listing 17 . SVG code to draw more lines.
- Listing 18 . Set the stroke-width attribute value.
- Listing 19 . Modified stroke-width attribute value.
- Listing 20 . Draw text.
- Listing 21 . SVG code to draw text.
- Listing 22 . Write the output file.
- Listing 23 . The remaining Java code.
- Listing 24 . Windows batch file.
- Listing 25 . The program named Svg21a.java.
- Listing 26 . The program named SvgLib21.java.
- Listing 27 . The program named Svg21.java.
Supplemental material
I recommend that you also study the other lessons in my extensive collection of online programming tutorials. You will find a consolidated index at www.DickBaldwin.com .
Discussion
Creation of tactile graphics
The module titled Manual Creation of Tactile Graphics explains how to create tactile graphics from svg files that I will provide.
If you are going to have an assistant create tactile graphics for this module, you will need to download the file named Phy1002.zip , which contains the svg files for this module. Extract the svg files from the zip file and provide them to your assistant.
In each case where I am providing an svg file for the creation of tactile graphics, I will identify the name of the appropriate svg file and display animage of the contents of the file for the benefit of your assistant. As explained here , those images will be mirror images of the actual images so that your assistant can emboss the image from the back ofthe paper and you can explore it from the front.
I will also display a non-mirror-image version of the image so that your assistant can easily read the text in the image.
What is SVG (Scalable Vector Graphics) ?
The shortest answer that I can come up with is that SVG is a technology that makes it possible for a blind student to create technical drawings. If thestudent can imagine it, the student can draw it using SVG and drawing tools that I will provide in this module.
According to Wikipedia
"Scalable Vector Graphics (SVG) is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic (i.e. interactive or animated).