<< 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

Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
Daniel
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
characteristics of micro business
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
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
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
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
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
Got questions? Join the online conversation and get instant answers!
Jobilize.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