<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WebProNews &#187; vector</title>
	<atom:link href="http://www.webpronews.com/tag/vector/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webpronews.com</link>
	<description>Breaking News in Tech, Search, Social, &#38; Business</description>
	<lastBuildDate>Mon, 13 Feb 2012 11:05:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Understanding Vector and Raster Graphics</title>
		<link>http://www.webpronews.com/understanding-vector-and-raster-graphics-2006-08</link>
		<comments>http://www.webpronews.com/understanding-vector-and-raster-graphics-2006-08#comments</comments>
		<pubDate>Mon, 07 Aug 2006 20:20:12 +0000</pubDate>
		<dc:creator>Bharat Bista </dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[raster]]></category>
		<category><![CDATA[vector]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=30780</guid>
		<description><![CDATA[<p>Choosing the right design, the right designer and the right graphics is essential. Selecting the right business, the right platform and the right time is crucial.</p>
<p>If you have an artistic hand but don't know how to write, or you have beautiful voice and you don't know how to sing, you may have a gift, but a paralyzed one.</p>
<p>You have a website and don't know what its composition is; you have graphics and don't know how they are designed; just the lack of this information you may lose your business.</p>]]></description>
			<content:encoded><![CDATA[<p>Choosing the right design, the right designer and the right graphics is essential. Selecting the right business, the right platform and the right time is crucial.</p>
<p>If you have an artistic hand but don&#8217;t know how to write, or you have beautiful voice and you don&#8217;t know how to sing, you may have a gift, but a paralyzed one.</p>
<p>You have a website and don&#8217;t know what its composition is; you have graphics and don&#8217;t know how they are designed; just the lack of this information you may lose your business.</p>
<p>Simple, yet complex, are the pages of your website containing <a href="http://www.gfxrebels.com/forum/">graphics</a> all together in every space. And those very graphics can hamper you, if not properly designed for an impressive deliverance to the customer.</p>
<p>If your site loads slowly in a browser, if your logos are not eye pleasing, if the fonts are not stylish, if the color combination and outline architecture is not smooth, you might be irritating your own costumer rather appealing to them.  </p>
<p><a href="http://www.gfxrebels.com/">Graphic design</a></p>
<p>Vector graphics is a geometric modeling of images, widely being used in Computer Graphics today. Vector graphics applies geometrical standards i.e., lines, curves, and polygons to represent images, while Raster graphics or a bit-mapped image, which is based on pixels in a grid, and contains information about the colors to be displaced in &quot;bits&quot;. Due to this raster graphics have fixed resolution, thus cannot be resized without losing image quality.</p>
<p>In addition, bitmap images have much large file sizes; however, vector graphics are prepared by many individual objects, and each of them are defined by geometrical data with individual properties allocated to it such as color, fill, and outline. Thus, vector graphics have free resolution and can bring high quality output at any scale.</p>
<p>Vector images are more flexible than bitmaps, and for that reason they can be resized and stretched. Additionally, images stored as vectors enhance appearances on monitors and printers with higher resolution, while bit-mapped images always appear the same, in spite of of a device&#8217;s resolution. Another advantage of vector graphics is it requires less memory than bit-mapped images do.</p>
<p>The word vector graphics is typically used in the context of two-dimensional computer graphics. Today almost all computer video displays transform vector representations of an image to a raster format.</p>
<p>Vector graphics editors usually allow a user to spin, shift, mirror, stretch, tilt, a combination of primitives into a more sophisticated objects. Vector graphics are better for designing outlines, typography, logos, technical illustrations, diagram and flowchart, while bitmap editors are more suitable for retouching photos, photo processing, and artistic illustrations.</p>
<p>It is ideally good for simple or complex drawings that need to be photo-realism. i.e., for PostScript and PDF page description languages use a vector graphics model. Vector graphic are perfect format for the Web as these are lightweight graphics to the websites due to its file size and problem free regarding physical height and width of the image.</p>
<p>These days, websites are filled with sophisticated icons, images, navigation bars, photographs, bottoms, logos, etc and for cutting the file size, vector graphics are efficient, smaller, compact, and scale perfect or independent resolution compare to the raster graphics.</p>
<p>Regarding programs which allows us to create and operate vector graphics, are called drawing programs, while programs that operate bit-mapped images are called paint programs.</p>
<p>Almost all graphics application these days, including CADD systems and animation software, use vector graphics; furthermore, printers like PostScript printers use vector graphics and fonts represent as vectors are called postscript fonts. While, dot-matrix printers, laser printers, and monitors, are raster devices, this means that all objects, even vector objects, must be translated into bit maps before being output which means, even vector graphic images must be interpreted to the raster graphic before the end product can be displayed on paper.</p>
<p>Interesting, yet most important note regarding these two graphics are, its similarity with the human organ behaviors; like bitmap images, the human eyes catches objects in a mosaic raster format by photon recipient nerves though physical world.</p>
<p>Another hand brain function perceives the objects as vector graphics in its visual world. As a result, the brain can easily recalls drawings like cartoon, logos, signs, images, symbols, banners, with outlines. Though the pixel image with mosaic format will be faded out, but the impression of outlines of the pictures will remain in the memory of a human being for long. Eyes cannot manipulate the objects seen in the outer world, it perceives as it is, while the mind can manipulate through its imagination in its mental zone.</p>
<p>If you have chosen the right graphics and the right graphic designer for your business, enrich your business with graphics that are web friendly, swift loading, attractive, impressive and much more than outlines that remain in the mind of your visitor for a very long time.</p>
<p>Your website design should be eye pleasing, mind snatching, impressive and overall appealing to the customers. Design simple, but yet make it striking!</p>
<p>Tag: </p>
<p>Add to <a class="printMailTop" onclick="window.open('http://del.icio.us/post?v=4&amp;partner=wpn&amp;noui&amp;jump=close&amp;url='+encodeURICo  mponent(location.href)+'&amp;title ='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return   false;" href="http://del.icio.us/post"><img border="0" src="http://images1.ientrymail.com/webpronews/delicious-pic.png" alt="" /> Del.icio.us</a> |   <a href="javascript:voidwindow.open('http://digg.com/submit?phase=2&amp;url='+encodeURIComponent(window.location.href)+'&amp;ei=UTF-8','  popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img border="0" src="http://images1.ientrymail.com/webpronews/digg-pic.png" alt="" /> Digg</a>  | <a href="javascript:void   window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&amp;u='+encodeURICompo  nent(window.location.href),'popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)   "><img border="0" src="http://images1.ientrymail.com/webpronews/yahoo-pic.png" alt="" /> Yahoo! My Web</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&amp;t='+encodeUR  IComponent(document.title)+' '"><img border="0" src="http://images1.ientrymail.com/webpronews/furl-pic.png" alt="" /> Furl</a></p>
<p>Bookmark WebProNews: <a href="http://www.webpronews.com"><img border="0" src="http://images.ientrymail.com/webpronews/wpn-readit.jpg" alt="" /></a>  <script language=JavaScript src="http://aj.600z.com/aj/1095/0/vj?z=1&#038;dim=1088&#038;pos=15"></script></p>
<p>Bharat Bista  <br />
Resources and References: <a href="http://www.creativepublic.com/">Graphic Design</a> &#8211; <a href="http://www.artspacedesign.biz/">Custom Web Site Design</a> &#8211; <a href="http://www.silkflowerdesign.com/">Silk Flowers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/understanding-vector-and-raster-graphics-2006-08/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bit vector, using Perl vec</title>
		<link>http://www.webpronews.com/bit-vector-using-perl-vec-2005-05</link>
		<comments>http://www.webpronews.com/bit-vector-using-perl-vec-2005-05#comments</comments>
		<pubDate>Fri, 27 May 2005 20:36:23 +0000</pubDate>
		<dc:creator>A.P. Lawrence</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=18878</guid>
		<description><![CDATA[A bit vector is just an array of bits; subsets of bits within the bytes have some meaning. That allows more compact storage for certain types of data. For example, if you only needed boolean on-off values, you can store eight values in one byte.
]]></description>
			<content:encoded><![CDATA[<p>A bit vector is just an array of bits; subsets of bits within the bytes have some meaning. That allows more compact storage for certain types of data. For example, if you only needed boolean on-off values, you can store eight values in one byte.</p>
<p>If your values require more than byte sized bits, the bits you require can still be packed more efficiently; if you need 10 bits, you can pack eight of those in an ten byte string (rather than the 16 or 32 bytes you might otherwise use).</p>
<p>The use of vector in this context probably came from jump tables: the bits represent a place for code to jump to, and therefor are at least vaguely related to the physics/engineering definition of a vector quantity (maginitude and direction). I still think of these as bit maps or bit fields, but apparently I&#8217;m out of touch.</p>
<p>Perl has the &#8220;vec&#8221; function for bit fields. Its granularity is a little bit limited: the number of bits you want to examine or set has to be a power of 2, so you can&#8217;t (for example) conveniently work with three bit fields. You&#8217;d need to use four bits, a small waste, or handle all the nasty details yourself with substr and << >> operators. Using &#8220;vec&#8221; is a lot more pleasant. Here&#8217;s an example sets some individual bits, and reads them back from the string.</p>
<p><code>#!/usr/bin/perl<br />
my $bitf;<br />
vec($bitf,0,1)=1;<br />
vec($bitf,1,4)=7;<br />
for($x=0;$x < 8;$x++) {<br />
 print "$x ",vec($bitf,$x,1), "\n";<br />
}<br />
# another way to print out a bit field<br />
print  unpack("b*", $bitf), "\n";<br />
That produces:</p>
<p>0&#038;nbsp 1<br />
1 &#038;nbsp0<br />
2 &#038;nbsp0<br />
3 &#038;nbsp0<br />
4 &#038;nbsp1<br />
5 &#038;nbsp1<br />
6 &#038;nbsp1<br />
7 &#038;nbsp0<br />
10001110</code></p>
<p>If you don't see why setting bits 4 to 7 as 7 produces "110", it's just simple banary, starting from bit 4: bit 4 has the value of 1 if set, bit 5 has 2, bit 6 has 4. </p>
<p>*Originally published at <a href="http://www.aplawrence.com">APLawrence.com</a></p>
<p>A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/bit-vector-using-perl-vec-2005-05/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vector Drawing Programs</title>
		<link>http://www.webpronews.com/vector-drawing-programs-2005-02</link>
		<comments>http://www.webpronews.com/vector-drawing-programs-2005-02#comments</comments>
		<pubDate>Tue, 15 Feb 2005 19:46:57 +0000</pubDate>
		<dc:creator>Blur Loterina </dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=14909</guid>
		<description><![CDATA[One of the best tools in creating and modifying a vector-based image is the Adobe Illustrator. Artworks done through the Illustrator can be used for print, multimedia and online graphics.
]]></description>
			<content:encoded><![CDATA[<p>One of the best tools in creating and modifying a vector-based image is the Adobe Illustrator. Artworks done through the Illustrator can be used for print, multimedia and online graphics.</p>
<p>Illustrator is used to open and manipulate vector-based drawing. Vector-based images are series of points connected by lines. It is also called object-oriented or draw images. It uses geometrical formulas to represent images. </p>
<p>Vector files have graphical elements called objects. These objects have properties including color, shape, outline, size, and position on the screen as well as the definition of the object. It is also a self-contained entity, which means that the properties of the object can be moved and changed without affecting the other objects while the clarity and crispness are preserved. This characteristic makes a vector-based image suitable for illustration and 3D modeling. An image is created by connecting vector point with straight or curved lines. Vector point or anchor point is the basis and the most fundamental component in every vector image </p>
<p>Unlike bitmap images, vector-based images are resolution dependent. The quality of the image increases as the resolution increases. So it looks better on devices with higher resolution. It can also be resized and stretched and does not become grainy. Since bitmap images are composed of dots, it losses its quality and proportion when stretched. </p>
<p>Vector images can also be converted to bitmap images. Almost all graphics system and animation software use vector graphics because it can be manipulated. </p>
<p>Importing of vector images into EPS, GIF or JPEG is not a problem. Vector images created by Illustrator or Freehand are composed of multiple objects. This allows the EPS (Encapsulated PostScript) vector image to be reduced or enlarged without sacrificing the quality. </p>
<p>Vector images are commonly used in GIF or Graphical Interchange Format files because they both consume a small file size, which is an advantage in Web page making. </p>
<p>JPEG (Joint Photographic Experts Group), mostly photographic images that undergoes editing, use vector images because of its resolution dependency. </p>
<p>If you want to make graphs and charts for presentations and printed publication, Illustrator is the right tool. You can also convert scanned art line into vector artwork. It is also used to rotate, distort and create special effects with text. However, Illustrator is not suited for page layout programs. A page layout program is where you make your catalogs, brochures, etc. You can import text or type text directly into the page layout document.</p>
<p>For additional information about the article log on to http://www.shortrunondemandprinting.com </p>
<p>admin@shortrunondemandprinting.com </p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/vector-drawing-programs-2005-02/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ray Tracing in C# and .NET</title>
		<link>http://www.webpronews.com/ray-tracing-in-c-and-net-2002-11</link>
		<comments>http://www.webpronews.com/ray-tracing-in-c-and-net-2002-11#comments</comments>
		<pubDate>Tue, 26 Nov 2002 20:00:01 +0000</pubDate>
		<dc:creator>Mike Gold</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Sphere]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=2270</guid>
		<description><![CDATA[<span class="text">Source code: <a href="http://mercury.ientrymail.com/cprogrammingtrends/code/Raytracing.zip">Raytracing.zip</a> 104 KB </span></span> 
<span class="text">I just saw the Japanese Animation movie <b style="mso-bidi-font-weight:normal"><i style="mso-bidi-font-style:normal">Spirited Away</i></b> and couldn&#8217;t help admiring the combination of cool moving graphics, computer generated backgrounds, and integration of sound. This inspired me to revisit the world of 3-D computer graphics. One of the coolest techniques in generating 3-D objects is known as <b style="mso-bidi-font-weight:normal">ray tracing.</b> This technique utilizes how the behavior of a particle of light (a photon) with a solid or refractive object. We are only interested in the rays that reflect into the camera or view area near the eye. This &#8220;view&#8221; area forms the image from the different colors and intensities bouncing back from the solid object.</span>
]]></description>
			<content:encoded><![CDATA[<p><span class="text">Source code: <a href="http://mercury.ientrymail.com/cprogrammingtrends/code/Raytracing.zip">Raytracing.zip</a> 104 KB </span></span><br />
<span class="text">I just saw the Japanese Animation movie <b style="mso-bidi-font-weight:normal"><i style="mso-bidi-font-style:normal">Spirited Away</i></b> and couldn&#8217;t help admiring the combination of cool moving graphics, computer generated backgrounds, and integration of sound. This inspired me to revisit the world of 3-D computer graphics. One of the coolest techniques in generating 3-D objects is known as <b style="mso-bidi-font-weight:normal">ray tracing.</b> This technique utilizes how the behavior of a particle of light (a photon) with a solid or refractive object. We are only interested in the rays that reflect into the camera or view area near the eye. This &#8220;view&#8221; area forms the image from the different colors and intensities bouncing back from the solid object.</span></p>
<p align="left"><span class="text">Sounds more like a science project than a computer program, but the ray tracing algorithm is pure mathematics (geometry and algebra). The sphere is the simplest object to ray trace, because the sphere can be described in one simple formula, where other shapes such as a cube need to be described as the combination of several planes. The formula for the sphere is:</span></p>
<table width="400" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background:#CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr>
<td valign="top">
<p class="MsoNormal" align="center" style="text-align:center"><span class="text">(x<sub>s</sub><br />
&#8211; x<sub>c</sub>)<sup>2</sup> + (y<sub>s</sub> &#8211; y<sub>c</sub>)<sup>2</sup> + (z<sub>s</sub><br />
&#8211; z<sub>c</sub>)<sup>2</sup> &#8211; r<sub>s</sub><sup>2</sup> = 0</span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span class="text">where:<br />
<b style="mso-bidi-font-weight:normal">x<sub>s</sub></b><sub> </sub>is the xcoordinate of a point on the sphere</span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span class="text"><b style="mso-bidi-font-weight:normal">x<sub>c</sub></b><sub><br />
</sub>is the x coordinate of the center of the sphere</span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span class="text"><b style="mso-bidi-font-weight:normal">r<sub>s</sub></b> is the radius of the sphere</span></p>
</td>
</tr>
</table>
<p class="MsoNormal"><span class="text">The majority of calculation in Ray Tracing is in finding a method to test for the intersection point of the object you are viewing. By the way, we are not concerned with speed in this program. If we were concerned with speed, we would use a watered-down version of ray tracing known as <b>ray</b> <b>casting</b> which is the technique used to form the graphics you see in Doom, Quake, Duke Nukem and other animation software that requires quick rendering. <o:p> </o:p> </span></p>
<p class="MsoNormal"><span class="text">The basic equation for a ray (or line) in 3D space is shown below: <o:p> </o:p></span></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background:#CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr>
<td valign="top">
<p class="MsoNormal" align="center" style="text-align:center"><span class="text">R(t)<br />
= R<sub>o </sub> + R<sub>d</sub> * t ( t > 0)</span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span class="text">where: <b style="mso-bidi-font-weight:normal">R<sub>o</sub></b><sub> </sub>is the origin point of the ray at (x<sub>o</sub>, y<sub>o</sub>, z<sub>o</sub>)</span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span class="text"><b style="mso-bidi-font-weight:normal">R<sub>d</sub></b><sub> </sub>is the direction of the ray at (x<sub>d</sub>, y<sub>d</sub>, z<sub>d</sub>) and is a unit vector (x<sub>d</sub><sup>2 </sup>+ y<sub>d</sub><sup>2 </sup>+ z<sub>d</sub><sup>2 </sup> = 1)</span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span class="text"><b style="mso-bidi-font-weight:normal">r<sub>s</sub></b> is the radius of the sphere</span></p>
</td>
</tr>
</table>
<p class="MsoNormal" align="left"><span class="text">You can almost think of it as the formula of a line in 3d space where R<sub>o </sub>is the y intercept and R<sub>d</sub> is the slope. Now let&#8217;s look at a use case of the ray tracing algorithm</span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoNormal" style="mso-list:l0 level1 lfo1;tab-stops:list .5in"><span class="text">For each pixel on the surface of a 2-D screen that the eye or camera is viewing, determine the world coordinates of the pixel.</span></li>
<li class="MsoNormal" style="mso-list:l0 level1 lfo1;tab-stops:list .5in"><span class="text">Cast a ray from the &#8220;camera&#8221; through the pixel</span></li>
<li class="MsoNormal" style="mso-list:l0 level1 lfo1;tab-stops:list .5in"><span class="text">Check for an intersection with a solid object (in this case a sphere.)</span></li>
<li class="MsoNormal" style="mso-list:l0 level1 lfo1;tab-stops:list .5in"><span class="text">For the nearest intersection with the solid object, determine a shade corresponding to the distance of the ray to the object.</span></ol>
<p><span class="text">Let&#8217;s look at the math in the algorithm and take a look at the Ray tracing formula broken up into its Cartesian coordinates:</span></li>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background: #CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr>
<td valign="top">
<p class="MsoNormal"><span class="text">x(t) = x<sub>o </sub><br />
+ x<sub>d</sub> * t (t > 0)<o:p> </o:p> </span></p>
<p class="MsoNormal"><span class="text">y(t) = y<sub>o </sub> + y<sub>d</sub><br />
* t <o:p> </o:p> </span></p>
<p class="MsoNormal"><span class="text">z(t) = z<sub>o </sub> + z<sub>d</sub><br />
* t </span></p>
</td>
</tr>
</table>
<p><span class="text">If we now substitute the ray formula into the equation for a sphere we get: </span></p>
<p><o:p> </o:p><br />
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background:#CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr>
<td valign="top">
<p class="MsoNormal" style="text-align:justify"><span class="text"><br />
(x<sub>o </sub> + x<sub>d</sub> * t &#8211; x<sub>c</sub>)<sup>2</sup> + (y<sub>o </sub><br />
+ y<sub>d</sub> * t &#8211; y<sub>c</sub>)<sup>2</sup> + (z<sub>o </sub> + z<sub>d</sub><br />
* t &#8211; z<sub>c</sub>)<sup>2</sup> &#8211; r<sub>s</sub><sup>2</sup> = 0</span></p>
</td>
</tr>
</table>
<p><span class="text">This formula can be solved for t by using the quadratic equation where: </span></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background:#CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr style="height:46.0pt">
<td valign="top">
<p class="MsoNormal"><span class="text">A = x<sub>d</sub><sup>2<br />
</sup>+ y<sub>d</sub><sup>2 </sup>+ z<sub>d</sub><sup>2 </sup> = 1 (because it&#8217;s<br />
a unit vector)<o:p> </o:p> </span></p>
<p class="MsoNormal"><span class="text">B = 2 [x<sub>d</sub>(x<sub>o </sub><b style="mso-bidi-font-weight:normal">-</b><sub><br />
</sub>x<sub>c</sub>)<sub> + </sub>y<sub>d</sub>(y<sub>o </sub><b style="mso-bidi-font-weight:normal">-</b><sub><br />
</sub>y<sub>c</sub>)<sub> + </sub>z<sub>d</sub>(z<sub>o </sub><b style="mso-bidi-font-weight:normal">-</b><sub><br />
</sub>z<sub>c</sub>) ]</span></p>
<p class="MsoNormal"><span class="text">C = (x<sub>o </sub><b style="mso-bidi-font-weight:normal">-</b><sub><br />
</sub>x<sub>c</sub>)<sup> 2 </sup><sub>+ </sub>(y<sub>o </sub><b style="mso-bidi-font-weight:normal">-</b>y<sub><br />
c</sub>)<sup> 2</sup><sub>+ </sub>(z<sub>o </sub><b style="mso-bidi-font-weight:normal">-</b><sub><br />
</sub>z<sub>c</sub>)<sup> 2</sup><o:p> </o:p> </span></p>
</td>
</tr>
</table>
<p><span class="text">So by the quadratic formula : </span></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background: #CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr>
<td valign="top">
<p class="MsoNormal"><span class="text">t<sub>intersect</sub><br />
= -B <sup>+/-</sup> Sqrt ( B<sup>2 </sup>&#8211; 4C)/2<b style="mso-bidi-font-weight:normal"><o:p><br />
</o:p> </b></span></p>
</td>
</tr>
</table>
<p class="MsoNormal"><span class="text">The discriminant B<sup>2 </sup>&#8211; 4C must be greater than zero or there is no intersection (B<sup>2 </sup>&#8211; 4C < 0 produces an imaginary root). Also we are only interested in the smallest root solution of t that is greater than zero. Even if the larger root of t is positive, this root would be passing through the opposite side of the sphere, which is the side we cannot see, so we throw this root out.</span></p>
<p class="MsoNormal"><span class="text">Now we have everything we need to determine the point of intersection and then the Normal vector. The normal vector is the vector perpendicular to the ray of intersection. We need this to get our final pixel.</span></p>
<p class="MsoNormal"><span class="text"> The point of intersection is the solution that we came up for <b style="mso-bidi-font-weight:normal">t</b> plugged back into the vector: <o:p> </o:p></span></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background:#CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr>
<td valign="top">
<p class="MsoNormal"><span class="text">(x<sub>i</sub>,<sub><br />
</sub>y<sub>i</sub>,<sub> </sub>z<sub>i</sub>,) = (x<sub>o + </sub>x<sub>d </sub>*<br />
t<sub>intersect</sub>, y<sub>o + </sub>y<sub>d </sub>* t<sub>intersect</sub>,<br />
z<sub>o + </sub>z<sub>d </sub>* t<sub>intersect</sub>)</span></p>
</td>
</tr>
</table>
<p><span class="text">The normal vector at the point of intersection is determined<br />
from the formula below: </span></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background:#CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr>
<td valign="top">
<p class="MsoNormal"><span class="text">(x<sub>n</sub>,<sub><br />
</sub>y<sub>n</sub>,<sub> </sub>z<sub>n</sub>,) = (x<sub>i </sub>&#8211;<sub> </sub>x<sub>c</sub>)/r<sub><br />
s</sub>, (y<sub>i </sub>&#8211;y<sub> c</sub>)/r<sub> s</sub>, (z<sub>i </sub>&#8211;z<sub><br />
c</sub>)/r<sub> s</sub>,</span></p>
</td>
</tr>
</table>
<p class="MsoNormal"><span class="text">Let&#8217;s go through the algebraic use case for calculating the pixels in the view again<o:p> </o:p> </span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;<br />
tab-stops:list .5in"><span class="text">1) Calculate the coefficients A, B and C from the quadratic solution using the direction vector of the ray, the ray origin point, the center point of the sphere, and the radius of the sphere.</span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;<br />
tab-stops:list .5in"><span class="text">2) Use A, B, and C to calculate the point where the ray intersects with the sphere.</span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;<br />
tab-stops:list .5in"><span class="text">3) If the discriminant B<sup>2 </sup>&#8211; 4C is less than 0, the ray does not intersect</span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;<br />
tab-stops:list .5in"><span class="text">4) If one of the roots of the solution t = -B <sup>+/-</sup> Sqrt ( B<sup>2 </sup>&#8211; 4C)/2 has a root where t< 0, then we throw out the root.</span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;<br />
tab-stops:list .5in"><span class="text">5) We want all solutions where t >= 0 but is the smaller of the two roots.</span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;<br />
tab-stops:list .5in"><span class="text">6) Use t to calculate the intersection point</span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo2;<br />
tab-stops:list .5in"><span class="text">7) Use the intersection point to calculate the normal vector</span><span class="text">Once we determine if the ray intersects with the object, we need to determine the shading of the pixel based on the vector of a light source. The shading of the pixel is determined by the inner product of the light source vector with the normal vector ray intersecting the object plus any ambient light.</span></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ccffcc" style="background:#CCFFCC;border-collapse:collapse;mso-padding-alt:0in 5.4pt 0in 5.4pt">
<tr>
<td valign="top">
<p class="MsoNormal"><span class="text">Shading = | R<sub>n<br />
</sub>* L<sub>a</sub> + ambient |</span></p>
</td>
</tr>
</table>
<p><span class="text">Now we have everything we need to create our ray-traced sphere in software. Below is the UML design of our ray tracing C# program divided into the core objects <b style="mso-bidi-font-weight:normal">Shape</b>, <b style="mso-bidi-font-weight:normal">Vector</b>, <b style="mso-bidi-font-weight:<br />
normal">Light</b>, <b style="mso-bidi-font-weight:normal">LightIntensity</b>, <b style="mso-bidi-font-weight:normal">Color</b>, <b style="mso-bidi-font-weight:<br />
normal">Camera, View2D. </b>The objects <b style="mso-bidi-font-weight:normal">Sphere</b> and <b style="mso-bidi-font-weight:<br />
normal">Plane </b>are objects for viewing that inherit from the Shape object and override the <b style="mso-bidi-font-weight:normal">DoesRayIntersect</b> method. <b style="mso-bidi-font-weight:<br />
normal">Light</b> and <b style="mso-bidi-font-weight:normal">LightIntensity </b>classes<b style="mso-bidi-font-weight:normal"> </b>are used to determine the shading of the object based on the formula above. The <b style="mso-bidi-font-weight:normal">View2D </b>class is used to draw the pixel from the intersecting ray and the color determined from the Shading formula to the Form. The <b style="mso-bidi-font-weight:normal">Camera</b> class is used to determine each sample ray being passed to the algorithm. Most of the algorithm occurs in the overridden <b style="mso-bidi-font-weight:<br />
normal">DoesRayIntersect </b>method of the different shapes which not only determines if the ray sample intersects the object, but returns where it intersects if it does.</span></p>
<p align="center"><span class="text"><a href="http://mercury.ientrymail.com/cprogrammingtrends/graphics/RayTra2.gif">Click Here for </a><a href="http://mercury.ientrymail.com/cprogrammingtrends/graphics/RayTra2.gif"> Figure 2<br />
</a>UML Diagram of Ray Tracing Algorithm, reverse engineered using the<a href="http://www.microgold.com">WithClass UML Tool</a></span></p>
<p><span class="text">The <b>DoesRayIntersect</b> method of the sphere used to determine the intersection of the ray with the sphere is shown below. This method is called in the Form&#8217;s Paint Event Handler for each pixel in the normalized camera grid to test and find the intersection of the ray from the camera to the sphere object and draws it if it exists. Note how <b>DoesRayIntersect</b> steps through each step of the algorithm and checks <b>t</b> along the way to make sure its a valid ray intersecting with the sphere.</span></p>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCFFCC">
<tr>
<td width="100%" height="19"><span class="text"><font size="2"><font COLOR="#0000ff">public</font> <font COLOR="#0000ff">override</font> <font COLOR="#0000ff">bool</font> DoesRayIntersect(Vector Ro, Vector Rd, <font COLOR="#0000ff">ref</font> Vector v){<font COLOR="#008000">// Determine initial position (Ro &#8211; Rc) = (origin of ray &#8211; sphere center)</font></font> </span>
<p><span class="text"><font size="2">Vector vec = Ro &#8211; Rc;</font></span></p>
<p><span class="text"><font size="2"> <font COLOR="#008000">// Use Rd and vec to determine the b component of the quadratic for // the determinant by taking the dot product</font> <font COLOR="#0000ff">double</font> b = Rd * vec;</font></span></p>
<p><span class="text"><font size="2"><font COLOR="#008000">// calculate the c component of the quadratic from (Ro-Rc)^2 &#8211; (radius of sphere)</font> <font COLOR="#0000ff">double</font> c = vec * vec &#8211; radius * radius;</font></span></p>
<p><span class="text"><font size="2"><font COLOR="#008000"> // calculate the discriminant</font> <font COLOR="#0000ff">double</font> discriminant= b * b &#8211; c;</font></span></p>
<p><span class="text"><font size="2"><font COLOR="#008000">// if the discriminant< 0 </font> <font COLOR="#008000">// there is no intersection, return<br />
</font> <font COLOR="#0000ff">if</font> (discriminant< 0)<font COLOR="#0000ff">return</font> <font COLOR="#0000ff">false</font>;</font></span></p>
<p><span class="text"><font size="2"><font COLOR="#008000">// calculate t for the ray</font> <font COLOR="#0000ff">double</font> dsquared = Math.Sqrt(discriminant);<br />
<font COLOR="#0000ff">double</font> t = -b + dsquared ;</font></span></p>
<p><span class="text"><font COLOR="#008000" size="2">// if t is less than zero, the ray is coming from inside the sphere, skip it. // We only want the smallest root, t, that is positive.</font></span></p>
<p> <span class="text"><font size="2"><font COLOR="#0000ff"> if</font>(t < 0) <font COLOR="#0000ff">return</font> <font COLOR="#0000ff">false</font>;</font></span></p>
<p><span class="text"><font size="2"><font COLOR="#008000">// t meets all the necessary conditions. // calculate the intersecting vector by substituting t back in</font> Vector v1 = Rd * t + Ro; v1 = v1 &#8211; Rc;</font></span></p>
<p><span class="text"><font size="2"><font COLOR="#008000">// normalize the vector<br />
(scale the vector such that x^2 + y^2 + z^2 = 1)</font><br />
v1.normalize();</font></span></p>
<p><span class="text"><font size="2">v = v1;</font></span></p>
<p><span class="text"><font size="2"><font COLOR="#0000ff">return</font> <font COLOR="#0000ff">true</font>;<br />
}</font></span></td>
</tr>
</table>
<p>After the intersection is determined and the normal vector is computed, we can combine the vector with the lighting vector to get a color for the vector. This is done with our <b><span class="text">LightIntensity</span></b> object in the <b><span class="text">DetermineIntensity</span></b> method shown below:<br />
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCFFCC">
<tr>
<td width="100%"><span class="text"><font SIZE="1">  </font><font size="2"><font COLOR="#0000ff">public</font> <font COLOR="#0000ff">void</font> DetermineIntensity(Vector rayVector, <font COLOR="#0000ff">ref</font> Color aColor)<br />
<font COLOR="#008000">// take the dot product of the light source vector and the vector we just determined // add the ambient value // use the red color for shading</font><br />
aColor.red = (lightSource.V * rayVector) + ambientLight;<font COLOR="#0000ff"> </font> <font COLOR="#0000ff">if</font> (aColor.red < 0) aColor.red = -c.red; aColor.green = 0.0; aColor.blue = 0.0;}</font></span></td>
</tr>
</table>
<p><span class="text">We can also draw the 3D vector on a 2D surface using the x and y coordinates of the ray with the help of the DrawPixel method in the View2D class. We&#8217;ll use the resolution of the surface to scale the vector up so we can see it on the form. Also note that we add one to the position to make sure its not sitting in the negative plane of the form. A pen is created using the color we just came up with in our LightIntensity Object.</span></p>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCFFCC">
<tr>
<td width="100%"><span class="text"><font SIZE="1">  </font><font size="2"><font COLOR="#0000ff">public</font><br />
<font COLOR="#0000ff">void</font> DrawPixel(Color color, Graphics g, Vector position)<br />
<font COLOR="#008000">// scale up the vector x and y coordinates so we can see them on the form.  // Also translate them into the positive plane.</font><br />
<font COLOR="#0000ff">int</font> x = (<font COLOR="#0000ff">int</font>) ((position.x<br />
+ 1.0) * (resolutionX/5));<font COLOR="#0000ff"> int</font> y = (<font COLOR="#0000ff">int</font>)((position.y<br />
+ 1.0) * (resolutionY/5));</font> </span>
<p><span class="text"><font COLOR="#008000" size="2">//<br />
Draw a pixel according to the color that we determined from our LightIntensity class. Convert our Color class // to the internal .NET color class using the Argb function</font></span></p>
<p><span class="text"><font size="2"> g.DrawLine(<font COLOR="#0000ff">new</font> Pen(System.Drawing.Color.FromArgb(color.GetRed(), (<font COLOR="#0000ff">int</font>)color.GetGreen(),<br />
(<font COLOR="#0000ff">int</font>)color.GetBlue()), 1), (<font COLOR="#0000ff">int</font>)x,<br />
(<font COLOR="#0000ff">int</font>)y, (<font COLOR="#0000ff">int</font>)x+1, (<font COLOR="#0000ff">int</font>)y);</font></span></p>
<p><span class="text"><font size="2">}</font></span></td>
</tr>
</table>
<p><span class="text"><b>Drawing a Plane </b></font></span><span class="text">Although we didn&#8217;t talk about them in this article, the code also contains ray tracing for planes as well. If you want to examine ray tracing of planes, you can try uncommenting the code in the Form for creating a plane and comment out the code for drawing a sphere. The algorithm for drawing a plane is slightly different, although we derive t through the same algebraic method we did for the sphere. Some of the references below will give you a good idea on how a plane is ray-traced.</font></span></p>
<p><span class="text"><b>References on the Web </b></font></span><span class="text">This article was developed referencing the information from the following links: </font><a href="http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtrace0.htm"> Ray Tracing by SigGraph<br />
</a></font><a href="http://www.cs.unc.edu/~rademach/xroads-RT/RTarticle.html">Ray Tracing: Graphics for the masses</a></span></p>
<p><span class="text"><b>Conclusion</b>Ray tracing is a very powerful demonstration of what a computer is capable of graphically purely through mathematics. With other techniques such as refraction and texture mapping you can produce some pretty awesome spectacles on your computer screen. Have fun <i>tracing</i> your steps in .NET!</span></p>
<p><span class="text"><a href="http://www.c-sharpcorner.com/Store/Books/VisualCsharp.asp"><img src="http://grfx.listmail.net/cprogrammingtrends/CompleteVisualCSharpProgGuide.jpg"border="0" align="right"></a><strong>The Complete Visual C# Programmer&#8217;s Guide</strong> covers most of the major components that make up C# and the .NET environment. The book is geared toward the intermediate programmer, but contains enough material to satisfy the advanced developer. The book starts by introducing the reader to the .NET environment and some basic C# program examples. The book then goes in depth on how to navigate the Visual Studio environment and introduces the reader to the C# language From here the book dives into the .NET framework and how to take advantage of its capabilities using C#. Some of the topics covered in great detail include ADO.NET database programming, ASP.NET and Web Services, COM interoperability programming, security in .NET, mobile phone programming, GDI+ graphic programming, multithreading, Windows Services, XML and SOAP in .NET, and much more. Chapters in the book contain programming examples, reference tables, and step-by-step tutorials to guide you through one of Microsoft&#8217;s greatest achievements in programming environments.<br />
</span></p>
<p>Mike Gold is President of Microgold Software Inc. and Creator of WithClass 2000 a UML Design Tool for C#. Visit http://www.microgold.com/. In the last few years Mike has consulted for companies such as Merrill Lynch and Chase Manhattan Bank in New York. He is been active in developing Visual C++ Applications for 10 years and looks forward to the possibilities in C#. You can reach him at techsupport@microgold.com. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/ray-tracing-in-c-and-net-2002-11/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vector vs Bitmap Graphics</title>
		<link>http://www.webpronews.com/vector-vs-bitmap-graphics-2001-06</link>
		<comments>http://www.webpronews.com/vector-vs-bitmap-graphics-2001-06#comments</comments>
		<pubDate>Tue, 12 Jun 2001 17:40:55 +0000</pubDate>
		<dc:creator>MC MCSE</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=566</guid>
		<description><![CDATA[There are 2 types of graphics and it is very important to understand the difference between them.

Bitmap Images
]]></description>
			<content:encoded><![CDATA[<p>There are 2 types of graphics and it is very important to understand the difference between them.</p>
<p>Bitmap Images</p>
<p>The first type are called Bitmaps (or raster images) and are based on pixels. One of the disadvantages of this type of graphic is that it does not scale well. If you resize a bitmap image, you may notice that the image quality suffers. To understand why this happens, you need to realize what it means for an image to be composed of pixels. If you open a bitmap graphic in an application such as Photoshop and begin to zoom in on the image, you will probably notice that the image is broken down into smaller squares at around 300-400 percent. Keep zooming in and this will become more apparent. Each of these little blocks is a pixel and can contain only 1 color. Because a pixel takes up a visible amount of space and can only be filled with 1 color, you can imagine that some special process must be in effect to create the illusion of smooth transitions between colors. This is a dithering technique called Antialiasing that attempts to give the illusion of smooth blends between colors as well as to diminish the jagged effects of curves and diagonal lines. In the graphic below, the bitmap is antialiased. If it wasn&#8217;t, it would look even more jagged.</p>
<p>When scanning graphics into applications that deal with bitmap data only, make sure that you scan the image in at the exact size that you need. This will prevent you from having to resize the image and compromise the quality.</p>
<p><img src="http://www.techtutorials.com/tutorials/images/bitmap.jpg" align="center"> &#8211; bitmap </p>
<p><img src="http://www.techtutorials.com/tutorials/images/vector.gif" align="center"> &#8211; vector</p>
<p><b>Vector Images</b></p>
<p>The other type of graphic is called a vector graphic. Vector graphics do not use pixels and are based on mathematical formulas that represent curves and lines. Vector graphics are very smooth looking and can easily be resized without loss of image quality. This is not a math tutorial so we will try not to go too in depth, however, the following example may clear up what makes vector graphics so sharp and scalable.</p>
<p align="center"> <img src="http://images.ientrymail.com/websitenotes/boxtext0605.gif" border="0"></p>
<p>Let&#8217;s say that we draw a line that is represented by the equation 3x+2y-13=0. In order to double the size of that line, we would multiply the equation by 2 as follows 2(3x+2y-13=0). This should create a line that is 2x the size of the original and is based entirely on math and doesn&#8217;t use pixels which means that there is no need for the application to use a dithering effect to give the appearance that the line is perfectly smooth&#8230; It already is. </p>
<p>So what if you need to bring a vector based image into an application that does not support them? If the graphics application you are using cannot handle vector files then save them as EPS (Encapsulated PostScript) files. An EPS essentially places a PostScript wrapper around your image and preserves all of the image data. In the case of a vector image, the mathematical equations that represent your vector image will remain and not be converted when brought into the application.</p>
<p>MC MCSE is a popular computer certification website devoted to providing free learning materials to candidates pursuing Microsoft, CompTIA and Cisco certifications. To access these resources visit http://www.mcmcse.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/vector-vs-bitmap-graphics-2001-06/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction To Scalable Vector Graphics</title>
		<link>http://www.webpronews.com/introduction-to-scalable-vector-graphics-2001-03</link>
		<comments>http://www.webpronews.com/introduction-to-scalable-vector-graphics-2001-03#comments</comments>
		<pubDate>Tue, 27 Mar 2001 17:48:36 +0000</pubDate>
		<dc:creator>Steve White</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[vector]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=409</guid>
		<description><![CDATA[SVG is built on top of XML in order to describe 2D vector capable graphics. XML stands for "Extensible Markup Language". A full description of XML is best suited for a future article since it can be quite technical. To simplify XML, it is similar to HTML but provides greater customization of the tags. HTML is a set of pre-defined tags that are used to describe a web page. XML however, does not pre-define the tags.
]]></description>
			<content:encoded><![CDATA[<p>SVG is built on top of XML in order to describe 2D vector capable graphics. XML stands for &#8220;Extensible Markup Language&#8221;. A full description of XML is best suited for a future article since it can be quite technical. To simplify XML, it is similar to HTML but provides greater customization of the tags. HTML is a set of pre-defined tags that are used to describe a web page. XML however, does not pre-define the tags.</p>
<p>&#8220;I already know HTML. Does this mean it will be replaced by XML?&#8221;</p>
<p>There is a bit of confusion surrounding XML and it&#8217;s relationship with HTML. HTML already does its job quite well. If you were to use XML to create an easily understood general format for people to create web pages you would end up with something very similar (or identical) to HTML. The problem with HTML is that this is really all it can do. XML on the other hand, provides them ability to create other document formats such as databases, spreadsheets and e-commerce sites.</p>
<p>SVG could not be built on top of HTML because HTML&#8217;s format is fixed. XML on the other hand is the ideal candidate to create a new open graphics format for the web. If you would like to delve into XML in more detail, you can take a look at the following sites:</p>
<p><a href="www.w3.org/XML/">www.w3.org/XML/</a></p>
<p><b>&#8220;But am I going to have to learn XML in order to use SVG?&#8221;</b></p>
<p>The answer is no. You are going to have to learn SVG if you want to code it yourself. By doing that you will have learned this particular flavor of XML. XML used for a spreadsheet however, will probably look very different.</p>
<p><b>&#8220;What do I need to do to get started?&#8221; </b><br />
It is expected that the major Browser&#8217;s will support SVG in the near future. Until they do release versions with native SVG support you will need to install an SVG viewer plugin for your current browser. There are several available. I tried Adobe&#8217;s viewer but there are others. These are the one&#8217;s that I am aware of:</p>
<p>Adobe: <a href="http://www.adobe.com/svg/viewer/install/">http://www.adobe.com/svg/viewer/install/</a><br />
IBM : <a href="http://www.alphaworks.ibm.com/tech/svgview">http://www.alphaworks.ibm.com/tech/svgview</a><br />
CSIRO: <a href="http://sis.cmis.csiro.au/svg/index.html">http://sis.cmis.csiro.au/svg/index.html</a> </p>
<p><b>&#8220;So how do I add SVG to my web site?&#8221; </b><br />
You can create SVG in several different ways. The simplest and most straightforward way is to create a &#8220;.svg&#8221; file using a standard text editor. The format for an SVG file is similar to a HTML document but the tags are different.</p>
<p>&lt;?xml version=&#8221;1.0&#8243; standalone=&#8221;yes&#8221;?&gt;<br />
&lt;!DOCTYPE svg PUBLIC &#8220;-//W3C//DTD SVG 20000802//EN&#8221; &#8220;http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd&#8221;&gt;<br />
&lt;svg width=&#8221;5cm&#8221; height=&#8221;6cm&#8221;&gt;<br />
&lt;desc&gt;An SVG example.&lt;/desc&gt;<br />
&lt;rect style=&#8221;fill:blue;&#8221; x=&#8221;0.5cm&#8221; y=&#8221;0.5cm&#8221; width=&#8221;2cm&#8221; height=&#8221;1cm&#8221;/&gt;<br />
&lt;rect style=&#8221;fill:green;&#8221; x=&#8221;3.5cm&#8221; y=&#8221;0.5cm&#8221; width=&#8221;1cm&#8221; height=&#8221;1.5cm&#8221;/&gt;<br />
&lt;ellipse style=&#8221;fill:red;&#8221; cx=&#8221;2.5cm&#8221; cy=&#8221;3.5cm&#8221; rx=&#8221;2cm&#8221; ry=&#8221;1cm&#8221; /&gt;<br />
&lt;text style=&#8221;fill:black;&#8221; x=&#8221;0.8cm&#8221; y=&#8221;5.5cm&#8221;&gt;A simple SVG example.&lt;/text&gt;<br />
&lt;/svg&gt;</p>
<p>If you have your viewer installed correctly, you should be able to see this example posted at:</p>
<p><a href="www.imswebtips.com/is58fig1.svg">www.imswebtips.com/is58fig1.svg</a></p>
<p>The first two lines of the file identify this as an XML document to be interpreted as SVG. This is pretty standard boilerplate but it will need to be done correctly.</p>
<p>The interesting stuff starts within the SVG tags. As you will note the elements within this example are pretty simple to interpret. Rectangles, ellipses, text, images etc. Pretty much everything you could find within a HTML document.</p>
<p>Like DHTML, SVG also supports CSS (Cascading Style Sheets) and access to the DOM (Document Object Model) using Javascript. This means that an SVG document can be fully animated. But unlike DHTML, the document supports vector graphics so that it will be much faster and provide more flexibility.</p>
<p>Steve White of http://www.IMSWebTips.com Virtual Mechanics &#038; IMSWebTips offers DHTML tools and information, and also publishes a web tips ezine with lots of great ideas, snippets of code, and HTML and DHTML tutorials for any webmaster, regardless of experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/introduction-to-scalable-vector-graphics-2001-03/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 1/40 queries in 0.016 seconds using memcached
Object Caching 398/503 objects using memcached

Served from: webpronews.com @ 2012-02-13 07:16:56 -->
