Author Topic: Analog laser shunt modulation  (Read 31599 times)

0 Members and 1 Guest are viewing this topic.

Offline dtewksbury

  • Jr. Member
  • **
  • Posts: 94
  • Milliwatts: 1
  • Gender: Male
    • View Profile
Re: Analog laser shunt modulation
« Reply #15 on: November 21, 2009, 11:25:28 pm »
Thats very good, I just did what you said above, and that looks cool. The image of the gears I did above also has animation. I will have to get my video camera out and post some animations that I have done as well.

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2129
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Analog laser shunt modulation
« Reply #16 on: November 21, 2009, 11:28:16 pm »
Take a look at the file LaserBoy_frame_set_effects.cpp and the function gears to see how it works.

James.  :)
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline dtewksbury

  • Jr. Member
  • **
  • Posts: 94
  • Milliwatts: 1
  • Gender: Male
    • View Profile
Re: Analog laser shunt modulation
« Reply #17 on: November 22, 2009, 04:46:04 am »
OK I will do that.

Man it is hot here today, in your terms 105.8 degrees f. 41 deg C, welcome to Sydney, Australia.

I have uploaded a video to youtube showing some of my animations. Plus near the end you can see some live hand drawn stuff that I add animation to afterwards, this was created from scratch while recording the video, hence my bad mouse writing. Apart from me cutting a little out to try to reduce the video size a bit, it is all done in real time, this will give you an idea of how quick it is to do animations.

Enjoy....  http://www.youtube.com/watch?v=jXRLetDm0SM

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2129
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Analog laser shunt modulation
« Reply #18 on: November 22, 2009, 02:21:12 pm »
WOW.

I really like the beam effect with the short lines.

And the floating stick man is a trip!

Can you say Wankle Rotary Engine?  ;D

James.  :)
« Last Edit: November 22, 2009, 02:23:43 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline drlava

  • Sr. Member
  • ****
  • Posts: 314
  • Milliwatts: 18
    • View Profile
Re: Analog laser shunt modulation
« Reply #19 on: November 22, 2009, 02:55:14 pm »
Nice live animation, exploding segments of the drawn text. 

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2129
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Analog laser shunt modulation
« Reply #20 on: November 22, 2009, 03:45:01 pm »
It's a beautiful, sunny 60°F here in Akron, Ohio!  ;D

James.  :)
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline dtewksbury

  • Jr. Member
  • **
  • Posts: 94
  • Milliwatts: 1
  • Gender: Male
    • View Profile
Re: Analog laser shunt modulation
« Reply #21 on: November 22, 2009, 03:59:21 pm »
Actually, I love rotary engines, good on mazda for keeping them alive.

It took me a while to figure out why just a simple vertical sin move didn't allow the big end to stay lined up with the crank, after examining the motion properly I realized that I had to add some second harmonic in as well. That fixed it. The beauty is that all of the animations are added with a dynamically allocated doubly linked list, so it is easy to add and remove animations in a chain. This allows for really complex mechanical motion simulations with only 2 or 3 deep animations.

60 F, mmmmm 15 degrees, that's too cool man, although you have really cold places over there, I prefer the heat, although not quite to this extent.     

Offline dtewksbury

  • Jr. Member
  • **
  • Posts: 94
  • Milliwatts: 1
  • Gender: Male
    • View Profile
Re: Analog laser shunt modulation
« Reply #22 on: November 22, 2009, 04:04:24 pm »
Nice live animation, exploding segments of the drawn text. 

Thanks, sorry about my mouse writing skills. Maybe I should use a tablet.

I don't know if you noticed, but when I was drawing the text there was the occasional un-blanked segment appearing. I only just noticed that myself. That is because when a vertex is created it is not blanked by default, and I blank it afterward.

So what is happening is that the output thread grabs the vertex before I set the blank flag. I will try setting them blank before adding them to the display list, hopefully that will fix it.

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2129
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Analog laser shunt modulation
« Reply #23 on: November 22, 2009, 04:20:24 pm »
When you say you have a doubly linked list of animations, do you mean vector filters? Are these things functions or what?

60°F in direct sunlight is OK by me! Especially in late November.  ;D

We live not too far south of Lake Erie, on the Top Half.  ;)

It does get cold here! -20°F once or twice a year is not too uncommon. 105°F is very rare, but it has happened.

I guess that's what 7° latitude will get you.

James.  :)

« Last Edit: November 22, 2009, 04:30:53 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline dtewksbury

  • Jr. Member
  • **
  • Posts: 94
  • Milliwatts: 1
  • Gender: Male
    • View Profile
Re: Analog laser shunt modulation
« Reply #24 on: November 22, 2009, 05:47:56 pm »
Well, I will try to explain.

An image is a collection of vertices, a class I call PointList. This is a linked list that holds the vertices, has load and save functions etc. Every Vertex has a pointer to another class called LaserAnimationList, this can contain LaserAnimations. All these lists have been made thread safe, so Animations can be added, removed or modified from the AnimationList. When the display engine reads a vertex it calls that vertexes AnimationList and that list manipulates that vertext. This is done for the entire list of vertices.

So every vertex has it's own AnimationList, and each list can have as many animations as you like. Also each animation can be linked to trigger or be triggered by any other animation in any other animation list, that's how I did the camshafts pushing the valves down, the cam shaft had a rotation animation, and that animation triggered the valves move animation (which was made of a delay + move animation). It's a bit hard to explain, you have to see it.

I am not sure what you mean by vertex filters, but I guess so. Yes they are functions of course, but there are lots of pointers that need to be set.

When an image is saved, it's entire hierarchy of animations etc is saved as well. This means that the timeline editor works really well and makes it easy to just drop any of these cool animations in sequence on the timeline (you can have as many laser tracks as you want, plus audio, dmx, serial etc), and each laser track can be assigned to a different laser driver (these are network based).

The advantage of doing it this way is that you can open a show and just drag the start and end points of each animation, and it will run for that length of time because everything is calculated as it plays. It is surprising how little CPU is used. I love that PC's are so powerful these days. Gone is the 1MHz Z80 with 16K RAM.....

I am rambling now, I will go and eat a donut, that will calm me down.
« Last Edit: November 22, 2009, 05:50:58 pm by dtewksbury »

Offline dtewksbury

  • Jr. Member
  • **
  • Posts: 94
  • Milliwatts: 1
  • Gender: Male
    • View Profile
Re: Analog laser shunt modulation
« Reply #25 on: November 22, 2009, 05:58:27 pm »
Apparently I am getting off topic now, that happens with me a lot I'm afraid.

I am still working on the laser blanking. It seems to be working fine (laser diode still alive). However I need to deal with the diodes threshold voltage variation with temperature, it's not an issue after running the system for 5 minutes or so, just when it starts and is cold the threshold voltage appears to be lower.

I need to read up more about quantum wells, I thought semiconductors have a lower junction voltage when hot, although FETs work the other way..... I must read read read.

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2129
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Analog laser shunt modulation
« Reply #26 on: November 22, 2009, 07:43:36 pm »
Linked lists are pretty cool, but you know they have some drawbacks, like overall size of memory consumption and an indexing Big O of N.

Do you keep a list of discarded objects and reuse them to keep from spending too much time creating and destroying your heap?

James.  :)
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline dtewksbury

  • Jr. Member
  • **
  • Posts: 94
  • Milliwatts: 1
  • Gender: Male
    • View Profile
Re: Analog laser shunt modulation
« Reply #27 on: November 22, 2009, 08:11:57 pm »
In some of my lists I do just flag entries as unused, and when it comes time to allocate a new one it gets re-used if available.

Yes it does use more memory, but in my case it's not that bad because I wrote the entire list handling library, so I have as little overhead as possible. Plus the list is traversable in both directions which is handy when doing things like calculating distance to previous vertex etc.

I have just recently (for this project) implemented the linked list as a templated class, so every list I make can now uses the same list base class (How cool is C++).

Query?
and an indexing Big O of N.
??? I don't know what this means?

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2129
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Analog laser shunt modulation
« Reply #28 on: November 22, 2009, 09:29:39 pm »
Big O of N means that it takes N time to get to the Nth element in the list.

With an array, access to any index is Big O of 1. How much time does your code spend counting elements into the lists?

Templates are really cool! I love the STL! I have done a few really complex projects that rely on a class or classes inherited from STL stuff. It is about as stripped down and smokin' fast as it gets. And it's all done before you even think about using it!

James.  :)
« Last Edit: November 22, 2009, 09:33:28 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline dtewksbury

  • Jr. Member
  • **
  • Posts: 94
  • Milliwatts: 1
  • Gender: Male
    • View Profile
Re: Analog laser shunt modulation
« Reply #29 on: November 23, 2009, 07:01:55 am »
Counting elements into the lists doesn't really happen that often because most of the routines traverse the list sequentially, like the display section, and UI section. Rarely is a list searched for entries. So it is no slower than using an array. granted there isn't random access, but when would that be required?

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.7 © 2008-2023, SimplePortal