<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/06/fun-with-papervision3d-graphic.html" />
  <link rel="self" type="application/atom+xml" href="http://www.insideria.com/atom.xml" />
  <id>tag:www.insideria.com,2009://34/tag:www.insideria.com,2008://34.23971-</id>
  <updated>2009-11-16T15:41:41Z</updated>
  <title>Comments for Fun With PaperVision3D &amp; Graphics Filters (http://www.insideria.com/2008/06/fun-with-papervision3d-graphic.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2008://34.23971</id>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/06/fun-with-papervision3d-graphic.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=23971" title="Fun With PaperVision3D &amp; Graphics Filters" />
    <published>2008-06-13T02:47:48Z</published>
    <updated>2008-07-16T01:18:19Z</updated>
    <title>Fun With PaperVision3D &amp; Graphics Filters</title>
    <summary>Since diving back into PaperVision3D in my last post, I&apos;ve been having some fun playing with 3D concepts.   I forgot how cool 3D visualizations can be, but at the same time, they can get really confusing and really complicated very quickly.  At the same time as they are getting complicated and confusing, they also start creating abstract shapes that are intriguing.</summary>
    <author>
      <name>Andrew Trice</name>
      
    </author>
    
    <category term="Blogs" />
    
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com/">
      <![CDATA[Since diving back into PaperVision3D in <a href="http://www.insideria.com/2008/06/3d-charts-using-papervision3d.html" target="_blank">my last post</a>, I've been having some fun playing with 3D concepts.   I forgot how cool 3D visualizations can be, but at the same time, they can get really confusing and really complicated very quickly.  At the same time as they are getting complicated and confusing, they also start creating abstract shapes that are intriguing.
<br /><br />
Next thing you know, its not a data visualization anymore... it may become just a neat trick, or perhaps a work of art.   In my case, its just a neat trick achieved by manipulating the environment used to create the visualization.
<br /><br />
I started playing around with the example from my previous post, take away this, add that, tweak this, tweak that.   Earier today, I stumbled upon an older blog post from <a href="http://www.bit-101.com/blog/?p=1035" target="_blank">Keith Peters showing an interesting outline effect achieved using a GlowFilter</a>.
<br /><br />
Here's what happens when you apply that same effect and a drop shadow to a modified version of the 3D shapes from my previous post, created with PaperVision.  
<br />

<iframe 
src="http://www.tricedesigns.com/portfolio/pv3dexperiment/Line3DChart.html"
width="425" height="350" frameborder="0">
</iframe>

<br /><br />

I changed the background color, removed the lines connecting the spheres, removed the axes from the visualization, changed node sizing, and added the graphics filters.   You can see how its done here:
<br /><br />
<div class="acode" style="overflow: auto; padding: 10px;" ><div style="overflow-x: visible;"> 
<code language="perl">
<pre>package  
{
 	<span class="category1">import</span> flash.events.Event;
 	<span class="category1">import</span> flash.filters.DropShadowFilter;
 	<span class="category1">import</span> flash.filters.GlowFilter;
 	
 	<span class="category1">import</span> org.papervision3d.core.geom.Lines3D;
 	<span class="category1">import</span> org.papervision3d.core.geom.renderables.Vertex3D;
 	<span class="category1">import</span> org.papervision3d.materials.ColorMaterial;
 	<span class="category1">import</span> org.papervision3d.materials.special.LineMaterial;
 	<span class="category1">import</span> org.papervision3d.objects.DisplayObject3D;
 	<span class="category1">import</span> org.papervision3d.objects.primitives.Sphere;
 	<span class="category1">import</span> org.papervision3d.view.BasicView;
  
  	[SWF(<span class="category2">backgroundColor</span>="<span class="quote">#FFFFFF</span>",<span class="category2">width</span>="<span class="quote">425</span>",<span class="category2">height</span>="<span class="quote">350</span>")]
 	<span class="category1">public</span> <span class="category1">class</span> Line3DChart <span class="category1">extends</span> BasicView 
 	{
  		<span class="category1">public</span> <span class="category1">var</span> chartContainer:DisplayObject3D;
  		<span class="category1">public</span> <span class="category1">var</span> chart:DisplayObject3D;
  		<span class="category1">private</span> <span class="category1">var</span> dataPoints : <span class="category2">Array</span>;
   			
   		<span class="category1">private</span> <span class="category1">static</span> const RADIUS : <span class="category1">int</span> = 75;
   		<span class="category1">private</span> <span class="category1">static</span> const MAX_SIZE : <span class="category1">int</span> = 600; 
   		<span class="category1">private</span> <span class="category1">static</span> const AXIS_SIZE : <span class="category1">int</span> = 800; 
   
  		<span class="category1">public</span> <span class="category1">function</span> Line3DChart()
  		{
   			<span class="category1">super</span>(stage.stageWidth, stage.stageHeight, <span class="category1">false</span>, <span class="category1">true</span>);
   			<span class="category2">init</span>(); 
   			<span class="category1">this</span>.filters = [<span class="category1">new</span> GlowFilter(0, 1, 4, 2, 2, 1, <span class="category1">true</span>, <span class="category1">true</span>), <span class="category1">new</span> DropShadowFilter( 15, 45, 0, .5 )];
   		}
   
  		<span class="category1">private</span> <span class="category1">function</span> <span class="category2">init</span>():<span class="category1">void</span>
  		{
    
   			chartContainer = <span class="category1">new</span> DisplayObject3D("<span class="quote">Chart Container</span>");
   			chart = <span class="category1">new</span> DisplayObject3D("<span class="quote">Chart</span>");
   			
   			chartContainer.rotationY=-15;
   			chartContainer.rotationX=-15;
   			dataPoints = <span class="category1">new</span> <span class="category2">Array</span>(); 
    
    			<span class="category1">var</span> defaultMaterial : LineMaterial = <span class="category1">new</span> LineMaterial(0xFFFFFF, .1);
   	 		<span class="category1">var</span> dataMaterial : ColorMaterial = <span class="category1">new</span> ColorMaterial( 0xFFFFFF, .96, <span class="category1">false</span> );
    			<span class="category1">var</span> lines : Lines3D = <span class="category1">new</span> Lines3D( defaultMaterial, "<span class="quote">Lines</span>" );
    			
    			chart.addChild( lines );
    			
    			<span class="category1">var</span> lastVertex : Vertex3D;
    			<span class="category1">var</span> currentVertex : Vertex3D = <span class="category1">new</span> Vertex3D();
    			
   			<span class="category1">for</span>(<span class="category1">var</span> i:<span class="category1">int</span> = -MAX_SIZE; i&lt;=MAX_SIZE; i+=20)
   			{
    				lastVertex = currentVertex;
    				currentVertex = <span class="category1">new</span> Vertex3D();
    				
    				currentVertex.<span class="category2">x</span> = i;
    				currentVertex.<span class="category2">y</span> = i * <span class="category2">Math</span>.<span class="category2">cos</span>( i );
    				currentVertex.z = i * <span class="category2">Math</span>.<span class="category2">sin</span>( i );
    				
    				<span class="category1">var</span> point : Sphere = <span class="category1">new</span> Sphere( dataMaterial, RADIUS );
    				point.<span class="category2">x</span> = currentVertex.<span class="category2">x</span>;
    				point.<span class="category2">y</span> = currentVertex.<span class="category2">y</span>;
    				point.z = currentVertex.z;
    				
    				chart.addChild( point ); 
    			}
    
    			chartContainer.addChild(chart);
   			scene.addChild(chartContainer); 
    
   			singleRender(); 
    
   			addEventListener(Event.ENTER_FRAME, <span class="category2">onEnterFrame</span>); 
   		}
   
  		<span class="category1">private</span> <span class="category1">function</span> <span class="category2">onEnterFrame</span>(e:Event): <span class="category1">void</span> 
  		{
   			chart.rotationY+=1; 
   			chart.rotationZ+=.5; 
   			singleRender(); 
   		}
  	}
}</pre>
</code>
 
</div></div> 
<br /><br />
You can find more information on PaperVision 3D at:<br />
<a href="http://blog.papervision3d.org/" target="_blank">PaperVision3D Blog</a><br />
<a href="http://code.google.com/p/papervision3d/downloads/list" target="_blank">PaperVision3D Downloads</a><br />
<a href="http://wiki.papervision3d.org/index.php?title=Main_Page" target="_blank">PaperVision3D Wiki</a><br />
<a href="http://www.nabble.com/Papervision3D-f22855.html" target="_blank">PaperVision3D Forums</a>
<br /><br />
You can learn more about graphics filters from my previous post <a href="http://www.insideria.com/2008/02/flex-graphics-tricks-part-3-gr.html" target="_blank">Flex Graphics Tricks Part 3: Graphics Filters</a>.


<br /><br />
___________________________________<br />
<strong>Andrew Trice</strong><br />
Principal Architect<br />
<a href="http://www.cynergysystems.com" target="_blank">Cynergy Systems<br />
http://www.cynergysystems.com</a>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23971-comment:2073971</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23971" type="text/html" href="http://www.insideria.com/2008/06/fun-with-papervision3d-graphic.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/06/fun-with-papervision3d-graphic.html#comment-2073971" />
    <title>Comment from Pradeep on 2009-08-29</title>
    <author>
        <name>Pradeep</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Hi,</p>

<p>I am a webdesigner / flash programmer.</p>

<p>I want to learn papervision3d, but i dont know how to start.</p>

<p>i want to know how to create any simple file in papervision3d.</p>

<p>can you guide me or can you give me the website link for download ebook or purchage any book for papervision3d</p>

<p>thanks in advance.</p>

<p>i am waiting for your positive replay</p>

<p>regards,<br />
Pradeep Patel</p>]]>
    </content>
    <published>2009-08-29T19:35:42Z</published>
  </entry>

</feed
