次の方法で共有


Bezier Curves and Car Manufacturers

Michael has asked me if it was possible to add Bezier curves to Live Geometry. So I went ahead and added a Bezier tool (and it took me about 30 minutes to do so!):

image

This draws a cubic Bezier curve using four points:

image

There is something beautiful and elegant about these curves. No wonder industrial designers use it a lot. I actually felt so inspired that I went ahead and used the tool to design a car :) Here's the live view (you need Silverlight 3 to see this), and you can drag the points around:

Get Microsoft Silverlight

This is so fascinating. Maybe if I'm tired of programming I should just design cars? ;) Any recruiters from Subaru reading this?

 

I also built in a possibility to pass arguments to Live Geometry using initParams:

 <object data="data:application/x-silverlight-2," 
type="application/x-silverlight-2" width="100%" height="100%">
  <param name="source" value="LiveGeometry.xap"/>
  <param name="initParams" 
         value="LoadFile=https://guilabs.de/geometry/drawings/fun/car.lgf,ShowToolbar=false" />
...

That's how I was able to embed Live Geometry into this page so that it doesn't show the toolbar and it automatically loads the car.lgf drawing.

Finally, here are some important things to know if you want to host a .xap file from another domain:

  • That domain must have crossdomain.xml at its root (so https://livegeometry.com/crossdomain.xml should be accessible)
  • If you're testing this by loading an .html file from a local filesystem, it will just display a white background and won't load the app. Put the .html on a webserver, then it will work

Comments

  • Anonymous
    November 03, 2009
    The comment has been removed

  • Anonymous
    November 04, 2009
    Hi Shankar, thanks for your comment! I haven't thought a lot about adding the usual UI controls to the drawing (such as textboxes, buttons, etc). Right now you can just add labels and hyperlinks. But I'll definitely think about adding more UI controls. For now, you can take a look at the implementation of the PropertyGrid (download the source code and search for PropertyGrid). Thanks, Kirill

  • Anonymous
    December 07, 2009
    The concept of Bezier curves in geometry looks like an interesting concept to me. I would like to learn this concept in order to apply it to normal manufacturing practices.