<< Chapter < Page Chapter >> Page >

SVG code to draw a circle

Listing 15 shows the SVG code produced by the Java code in Listing 14 .

Listing 15 . SVG code to draw a circle.
<circle fill="none" stroke="black" stroke-width="1" cx="725" cy="355" r="41"><title>circle</title></circle>

By now, you should see the pattern and there should be no need to explain the relationship between the attributes of the circle element and the parametervalues in the call to the makeCircle method in Listing 14 .

Draw more lines

The earlier section titled What does the image show describes how three cords are used to tie the masses to one another and to tie the leftmost mass to the wall. This is accomplished using the fourcalls to the Java makeLine method shown in Listing 16 .

Listing 16 . Draw more lines.
//Draw cord from wall to Mass C Element cordR = SvgLib21.makeLine(svg,ns, "line",1.0, 5.0,2, 5.0); //Draw cord from Mass C to Mass BElement cordQ = SvgLib21.makeLine(svg, ns,"line", 4.0,5.0, 5.0,5.0 );//Draw cord from Mass B to the top of the pulley. Element cordP1 = SvgLib21.makeLine(svg,ns, "line",7.0, 5.0,8.05, 5.0); //Draw the cord from the right side of the pulley to// Mass A Element cordP2 = SvgLib21.makeLine(svg,ns,"line", 8.5,4.5, 8.5,2.5 );

There is nothing new in Listing 16 .

SVG code to draw more lines

The Java code in Listing 16 produces the SVG code shown in Listing 17 .

Listing 17 . SVG code to draw more lines.
<line stroke="black" stroke-width="1" x1="90" y1="315" x2="180" y2="315"><title>line</title></line><line stroke="black" stroke-width="1" x1="360" y1="315" x2="450" y2="315"><title>line</title></line><line stroke="black" stroke-width="1" x1="630" y1="315" x2="725" y2="315"><title>line</title></line><line stroke="black" stroke-width="1" x1="765" y1="360" x2="765" y2="540"><title>line</title></line>

There is also nothing new in Listing 17 .

Change line thicknesses

With the exception of text to be discussed shortly, we have now created an element for every object that we need in our drawing.

As you may have noticed, the value of the stroke-width attribute for every element created so far has been "1". That is the defaultvalue. We may not be satisfied with that default value in all cases. We may prefer that some of the lines that describe the geometrical objects be thicker than linesthat describe other geometrical objects.

My SVG graphics library provides a method named setStrokeWidth that we can use to adjust the stroke-width attribute values for an elementbefore the final output SVG file is written. (As you will see if you examine Listing 27 , the library provides methods that let you adjust other attribute values as well.)

Questions & Answers

how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
Maciej
Do somebody tell me a best nano engineering book for beginners?
s. Reply
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
s.
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
SUYASH Reply
for screen printed electrodes ?
SUYASH
What is lattice structure?
s. Reply
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
Sanket Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
China
Cied
types of nano material
abeetha Reply
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials​ and their applications of sensors.
Ramkumar Reply
what is nano technology
Sravani Reply
what is system testing?
AMJAD
preparation of nanomaterial
Victor Reply
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
Himanshu Reply
good afternoon madam
AMJAD
what is system testing
AMJAD
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
Hello
Uday
I'm interested in Nanotube
Uday
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
Prasenjit
can nanotechnology change the direction of the face of the world
Prasenjit Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
Berger describes sociologists as concerned with
Mueller Reply
Got questions? Join the online conversation and get instant answers!
QuizOver.com Reply

Get the best Algebra and trigonometry course in your pocket!





Source:  OpenStax, Accessible physics concepts for blind students. OpenStax CNX. Oct 02, 2015 Download for free at https://legacy.cnx.org/content/col11294/1.36
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Accessible physics concepts for blind students' conversation and receive update notifications?

Ask