Author Topic: Drawing basics  (Read 39105 times)

0 Members and 1 Guest are viewing this topic.

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Drawing basics
« on: December 27, 2012, 11:46:26 am »
I'm interested in drawing some graphics and beam effects in the 'k' menu, but haven't quite figured it out.


1) How do I make a collection of 'dots' of a given color separated by blanks? I would want to be able to choose the number of vertices stacked to make each dot to adjust the dwell, either manually, or through an optimization setting or procedure.


2) How do I make a segment comprising multiple vertices? If I start with a new blank frame and press '.', nothing happens. If I move things a little and press '.', my line gets divided in two.


Thanks!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2130
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #1 on: December 27, 2012, 10:18:43 pm »
Hi tribble! Welcome to The LaserBoy Forum!  ;D

Drawing is a bit confusing, but once you get it, it makes sense.

In both menus k and l ( L ) you will see two cursrs that move along the vertices. The open square I called the egg and the other 8 legged thing is called the spider. These are to mark the beginning and the end of a selected portion of the art (in consecutive vertices).

The first thing that might be confusing is selecting a single vector. A vector is the line that exists between two vertices. In order to select a single vector, BOTH the egg and the spider must be on the destination end of the vector! The color and the blanking status of a vector is stored in the destination end of the vector.

The least amount of information you can have in a frame is two vertices; an anchor and a destination of a single vector.

In menu k a lot of the functionality only effects the vertex under the spider. You can move it in X Y and Z by hitting the keys x y & z! Upper case moves it in the opposite direction. You can also rotate the vector around its own anchor in the Z plane or the Y plane and you can change the length or magnitude of the vector.

From main, look in the [Tab] menu for:


0 move points per key hit
a rotate degrees per key hit
b scale percent per key hit

Points are relative to signed short integer space (-32767 to +32767)

Some of these functions don't make any sense on the zeroth vertex. That is the only vertex in the whole drawing that can only be an anchor. It can never have a color or be blank or not blank.

As you move the vertex cursors back and forth through the drawing with the [{ and ]} keys, you can see what vertex number each one is on in the information below the palettes.

The . will add a new vertex based on the one that is immediately before it in the drawing. If the spider is on the last vertex, it will make a new vector on the end of the drawing that is identical to the previous one (unless you run into the edge of space). If the spider is somewhere inside the drawing, it will split the vector in half.

When you make a new empty frame it actually has 2 vertices at the origin (no magnitude) and the vector they make is blank!

The first thing you might want to do is move the spider to the last vertex (number 1) and unblank the vector (capital B). Then pick a color with the p key. Capital P moves the color cursor backwards. Once you have the color you want, color the vector with the c key. Now you can see it!


You can move both the anchor and the destination of this first vector anywhere you want with the x, y, z keys. Then you can just pop and place vectors by moving the spider to the last vertex and hitting the . and moving the new vertex where you want it.

You might find it makes a lot of sense to "pop and rotate" vectors. Add a new vector with the . key and rotate it into place with the f or F key. That way every vector in the drawing will be the same magnitude regardless of its direction! That makes for an image that scans nicely and gives you even intensity (especially useful around curves).

To make a series of dots you can draw whatever you want in the color you want and select it with both the egg and the spider. Remember that the egg should be on the destination end of the first vector you want to select. Once selected, hit the t key in menu k to convert the vectors into dots!

You can also use the \ and the | keys to place the egg at the beginning and the spider at the end of the drawing, selecting the whole thing.


The keys u i and o select lit segments within the drawing (individually or consecutively).

Look in the [Tab] menu (from main) for the option of what to do with dots and also for the dwell count to apply to dots.

James. :)
« Last Edit: December 08, 2018, 01:38:37 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #2 on: December 27, 2012, 10:30:35 pm »
Ah, mysteries solved! Thanks for the detailed writeup. I'll try out some of these tips during my laser break tomorrow. :-)

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2130
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #3 on: December 27, 2012, 10:43:16 pm »
Once you get the basics of drawing, coloring, blanking and unblanking you can open a bitmap in the background of the display and trace over it! :)
« Last Edit: December 29, 2012, 03:33:46 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2130
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #4 on: December 28, 2012, 01:49:16 am »
It's worth noting. A lit vector can have a color that is black!

That makes a difference when the code looks for segments.

A segment is a series of consecutively lit vectors.

Imagine the letter O in text as a double stroked font outline with an inner o and an outer O.

Those two segments can be "bonded" together with lit black!

When you render font with the built in capabilities of LaserBoy the included ild files that work as fonts are bonded together with lit black. Any effect that you apply that looks for segments will find each glyph as one lit segment.

James. :)
« Last Edit: December 28, 2012, 02:12:35 am by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2130
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #5 on: December 29, 2012, 04:50:13 pm »
Show us a sample of what you come up with! :)
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #6 on: December 30, 2012, 01:44:40 pm »
James, thanks for your tips! I can see already how maybe the lit black can help me connect the inside and outside of the letter "e" and have it rotate as a single unit with the "rotate" effect. Right now they rotate independently, which looks a little odd.


On the whole though, well, I am having some difficulties. :-(


I thought it would be fairly easy to start with just some dots, but it turns out dots are maybe an advanced topic. :-)  What I want to be able to do is create some dots and move them around. This would be the seed of simple beam shows.


I was frustrated by LB crashing, and I worked out this minimum key sequence that you can use to repeat the crash... I think it's because if you delete the two default vertices and end up with no verticies on the screen something dies. I would draw something, and I would want to erase it and start over, so I would just hold down the backspace key, but because it goes so fast I would end up deleting everything and soon afterward LB would crash. Try this sequence:



(turn on info areas.. I think these are key)
/
?


(start drawing)
j
8
esc
k
y
]
B
X
.
bkspace
bkspace


*CRASH*


I'll keep working on things, but it is taking me a lot of time to get familiar with manual drawing. I'm afraid it will be a while before I will have anything to show for my efforts, sorry. :-(

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #7 on: December 30, 2012, 02:07:01 pm »
OK, after some more work I was able to generate a line, and convert that to dots! So, progress!


My problem is that my projector does not blank fast enough and I get a solid line with bright spots instead of a collection of isolated dots. I think I could go through and blank the 'last' vector of each dot, but that sounds labor intensive. Is there a setting somewhere that changes the "dwell after blank but before moving to the next point?" I have noticed this a lot in the frame effects as well; there are lots of 'tails' where there should be blanks. I am sure I have just inadvertently missed or altered a setting; can you enlighten me?


Thanks!


Tribble

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2130
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #8 on: December 30, 2012, 02:32:04 pm »
This is probably a matter of the time delay between the colors and the scanner signals.

The scanners take time to follow the control signal. The lasers do not.

If you use a LaserBoy DAC and waves, this is compensated by shifting the color signals behind the scanner signals in samples in the wave. You can set a sample offset for every channel. Each sample of delay is 1/48K seconds for a 48K wave. The default settings that work for most projectors I've ever seen is 5 samples of delay.

Since you are using the built-in DAC, I don't know what to suggest. Is there any way you have found to adjust the time delay between the colors and the scanners? There must be some delay. Otherwise it wouldn't work at all! If your scanners are out of tune, this effect may be more noticeable.

Are the tails on the leading end or the trailing end of the lit segments? In other words, do the lasers come on too soon or stay on too late?

I figured out the crash condition! It only happens when you have frame stats on and you delete all the vertices. It's probably a divide be zero error!

Thanks for your input.


Fixed it! :)
http://laserboy.org/code/LaserBoy_2012_12_30.zip

James. :)
« Last Edit: December 30, 2012, 03:48:48 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #9 on: December 30, 2012, 04:21:48 pm »
Are the tails on the leading end or the trailing end of the lit segments? In other words, do the lasers come on too soon or stay on too late?

That is an excellent question! I will make some test patterns and see which way the tails go. If I post pictures of the images, and post the .txt files that LB produces, maybe you can tell me how I need to adjust my graphics so they look best on the wall?

Thanks,
tribble

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #10 on: December 30, 2012, 05:16:20 pm »
OK, I'm excited! I think we may be on to something.


Here is a screenshot of my LaserBoy screen. There are two concentric circles created with the 'm' menu 'g' command. They are 22000 and 17000 radius. (By The Way... it does not seem possible to create circles of radius 30,000? The circles seem larger than they should be for a given radius and they get distorted above 25K or so.)


Traveling in ascending vertex number, the inner circle is drawn clockwise. The outer circle is drawn counterclockwise. I'm not sure why, but that's just how the 'q' optimize command chose to do it.





Here is a shot of the circles as projected. You can see that the FIRST vector, which should be red, is BLANK. You can also see the first blanking vector, which is supposed to be blank, is LIT. The second blank vector is blank. Now, at the other end of the blank, we start counterclockwise, but the first vector that is part of the circle that should be LIT is actually BLANK.





It's as if the index of the blank/colors is one off from the index of the vectors they apply to!


It's possible that the firmware in this projector has an off-by-one error. Or, it could be an off-by-one error in the code that writes out the .ild file format. Or it could be somewhere else. But it definitely looks like an off-by-one error to me.


It's uncanny how close the ends of the vertexes are as drawn to where they are in the editor. The 'tail' extends  halfway between the two circles; not a little bit, and not a lot, and it ends sharply. The unlit portions of the circles are exactly as long as the first vector composing them.


Now, I have no idea what to do about that, but at least I feel like I have a handle as to what's going on!


Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2130
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #11 on: December 30, 2012, 05:38:32 pm »
When you generate circles or other polar equations in LaserBoy, they are rendered according to the "rendered arc step in degrees" in the [Tab] menu. So a circle is a circle is a circle! (uh.... I think!)

You should be able to render a circle at just about any radius and copy it and size it to make multiple circles of different sizes.

Look into menu L for move, scale and rotate selected vertices.

If you want to keep working on this, I might be able to add some functionality to LaserBoy to be able to compensate for the off-by-one effect.

I will look into the clockwise vs. counterclockwise thing now.....

OK!

I think I see the problem. It's a matter of understanding my prompts! You can just hit return to take the default values designated inside the square brackets; ie: [ 0 ]

So the center of space is X = 0, Y = 0, Z = 0.

The radius is a point! So it needs the full set of coordinates. A radius POINT that would make a radius of 30000 would be

X = 30000, Y = 0, Z = 0.

That works!

If you define some other point, the circle will start and end there and you may end up with a circle that is rendered backwards!

James.
« Last Edit: December 30, 2012, 05:49:18 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #12 on: December 30, 2012, 08:56:38 pm »
OH, OK I understand the circle definition now. For some reason I thought it would generate a 'solid' ellipsoid figure by using the x/y/z radii, but if I think about the information you need to make an ellipsoid you need more than that. Sorry for my misunderstanding. I tried it your way (the right way) and it works as expected. :-)

I am interested in pursuing the 'off by one' behavior if you are. If it's peculliar to this projector, I'd hate to ask for an accommodation unless it might be generally useful. I tried going in and blanking/unblanking near the blank vectors, but failed to change the correct ones. I'm sure with practice it could be done by hand, but, that would not solve the issues for effects-generated frames.

Thanks for the help!

tribble


Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2130
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #13 on: December 30, 2012, 09:36:34 pm »
Don't be sorry! Sometimes it makes sense to me and it doesn't occur to me how other people might interpret it. It is a bit confusing when I ask for a radius point for the circle and then I ask for a simple radius for the fixed and rolling circles for the other polar shapes.   

But the reason is so you can place the entry and exit point of the circle where ever you want it.

BTW, Check out the "train" effect! Pick a frame. Hit o to output, 1 for ild, 4 for frame effect and choose train!

Then look at train.ild.

That effect walks the colors through the vertices in order, so one of the new frames it makes might line up for your projector!

If so, it would be very easy to copy and modify that effect specifically to fix your issue.

James.  :)
« Last Edit: December 30, 2012, 09:48:31 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #14 on: December 30, 2012, 10:49:08 pm »
OK! I tried the train. The thing about train is that only one segment appears to go dark at a time. In the case of the two circles, there are, I think, four vectors that need to be blank; the two that go from the inner circle to the outer circle, and the two that go back to the inner circle when the outer circle is completed. There are a few frames where the correct vertices are blank, but they are never all blank in the same frame.

Does that make sense?

I think it does confirm that there is an ordering issue; it's not that those vectors can't be blanked on this projector, just that it's blanking the "wrong" ones.

 

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