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!):


This draws a cubic Bezier curve using four points:


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:

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=,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 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 (3)
  1. I was looking out for a decent Silverlight app to do some diagramming and stumbled upon Livegeometry.

    It has been a wonderful experience since then.

    I would like to create a simple structure of a few textboxes (with borders) stacked one after another. How can have this simple functionality out of LG?

    please place me in your regular mailing list:

  2. 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).



  3. Stephen says:

    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.

Comments are closed.

Skip to main content