Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1] 2
Author Topic: Mind the Gaps
kongorilla
Pro
Posts: 382
Permalink
kongorilla
Post Mind the Gaps
on: July 4, 2013, 21:03
Quote

This is a problem I've been dealing with for almost a year, and I'm baffled why, if the lack of complaints in this forum is any indication, I'm the only person who has run into it. I've discussed it off-forum with Sandy a few times, but I don't think anyone else has contacted him about it.

See gaps that appear between every other pixel in the drawings marked '37' (indicating GRID SIZE 37)? See how they don't happen with GRID SIZE 38? Before I do any drawing, I have to find a grid size that doesn't do that during that particular session. The lower '37' drawing shows that the gaps reappear if I go back to that size after drawing the gap-free '38'.

Anyone else see this happen on their machine?

Image

sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: July 5, 2013, 23:16
Quote

I actually had this appear at me once or twice too, but couldn't replicate it. I think it has to be to do with the number of waves in a block (which is a product of pen width and grid size) not dividing the total length of the block cleanly. But I struggle to imagine that those cases are really as rare as that.

Did you ever try new firmware? Off the top of my head, I'm fairly sure I haven't done anything to that code for a long time, so I doubt it'd make any difference.

kongorilla
Pro
Posts: 382
Permalink
kongorilla
Post Re: Mind the Gaps
on: July 6, 2013, 01:32
Quote

Yeah, the occasion of starting this thread was having just updated to the latest firmware and controller. Whenever I do that there's always the not quite suppressed hope that the gaps will go away, making it more frustrating when they reveal themselves again.

This isn't at all rare for me; it happens as often as you'd imagine the "not dividing cleanly" circumstance would crop up. Every non-vector drawing I do starts with a test run on scrap paper, and it seems more often than not I have gaps, so I then fish around for settings that produce cleanly connecting pixels.

Other than running a really early version of the polarshield on a Chinese Mega, I don't know how my setup differs from the standard. Well, I guess my motors are different, too. I have a couple of yours I've been meaning to try, but haven't had the time to make brackets for them.

Unless there's a sudden flood of "ME TOO!" posts, I guess I'll have keep trying to suss this out on my own.

sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: July 6, 2013, 11:34
Quote

Hey are they 200 step/rev motors?

kongorilla
Pro
Posts: 382
Permalink
kongorilla
Post Re: Mind the Gaps
on: July 6, 2013, 18:54
Quote

No, 400.

sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: July 6, 2013, 20:53
Quote

Hum, and I guess its not just as simple as even numbers good, odd numbers bad? I will have a look at this, I know it'll be something simple.

Xander1027
Newbie
Posts: 3
Permalink
Post Re: Mind the Gaps
on: January 31, 2014, 01:08
Quote

I just finished building my polargraph and I'm getting this on my drawings. It seems to take a step midway through the stroke. So I would like to say "ME TOO!"

sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: February 1, 2014, 20:15
Quote

Never got to the bottom of this one, could never seem to replicate it. If you've got a script that does replicate it, I'd be very interested in getting a copy to study!

sn

kongorilla
Pro
Posts: 382
Permalink
kongorilla
Post Re: Mind the Gaps
on: February 12, 2014, 08:40
Quote

Here's a zip containing:
1. A small queue that, on my machine, draws pixels with gaps.
2. My default.properties.txt
3. A scan of the result.

Godspeed.
Image

kongorilla
Pro
Posts: 382
Permalink
kongorilla
Post Re: Mind the Gaps
on: February 12, 2014, 08:45
Quote

Oops. Here's the zip:
https://dl.dropboxusercontent.com/u/355931/GapTest1.zip

sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: February 12, 2014, 10:02
Quote

Oh sweet work k-dog, I am keen to try this out. Are you using the firmware from that zip package? (v1.66 I guess)

sn

kongorilla
Pro
Posts: 382
Permalink
kongorilla
Post Re: Mind the Gaps
on: February 12, 2014, 16:30
Quote

I'm gonna just assume I updated the firmware when I started using that controller. Sounds like something I'd do. S'been a long time since I made the switch, though.

Clym5
Newbie
Posts: 7
Permalink
Post Re: Mind the Gaps
on: March 7, 2014, 00:42
Quote

I had this problem, while using USB power for everything, and once I started using a 7.5v 1a wallwart, the problem dissapeared.

Just my two cents.

kongorilla
Pro
Posts: 382
Permalink
kongorilla
Post Re: Mind the Gaps
on: March 7, 2014, 01:37
Quote

I'm using a separate, 7.5v supply, too. Still happens. Whether tethered to my computer or drawing from the SD card. 🙁

sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: March 9, 2014, 19:35
Quote

Ok, good news on the gaps. Well, kind of anyway.

I ran Kong's test patch, and was pleased to find it was gappy too. Looking down the command queue, this last row of three pixels looked suspicious and I think they give the clue:

C05,1660,1701,41,118,END
C05,1618,1701,41,118,END
C05,1577,1701,41,118,END

No? For a pixel that is 41 steps wide (grid of 41), each centre-point should be 41 steps apart. The first one is 1660, but the next pixel is 1618, which is actually _42_ steps away. Every alternate pixel position is rounded up for some reason, and I suspect it is exactly that, some poorly applied rounding in the controller, converting between the different coordinates systems and scaling them. That's the good news really, if it's in the controller, then it isn't a fix that needs loads of hardware testing.

The bad news is that either way, I don't have much time to work on it and sort out a new release right now, but I'll stay on it and look at it while my heads still in this code.

sn
Image

kongorilla
Pro
Posts: 382
Permalink
kongorilla
Post Re: Mind the Gaps
on: March 10, 2014, 08:51
Quote

And all those simpletons back at the Institute called me MAD! I ask you, who's mad now?!

At this point, for me, getting this problem fixed isn't nearly as important as getting confirmation that it does exist. There's still the nagging question why everyone who uses the same software hasn't come to the forum with similar complaints. I can think of two explanations:
1. They aren't annoying whiners like I am.
2. My machine is so superior that it reveals flaws in the math that go unnoticed on everyone else's machines. (Well, heh, except yours, of course). 😉

I prefer explanation #2, so let's go with that for now.

sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: March 10, 2014, 09:36
Quote

I agree, too highly trained, like racehorses.

Some of the variables in the controller were switched from being integers to being floats, at around the time it became zoomable, and it obviously wasn't done very cleverly. Like you, for me the puzzle is really why it happens so rarely, when it seems like it should be common.

sn

nosetinker
Newbie
Posts: 5
Permalink
nosetinker
Post Re: Mind the Gaps
on: March 10, 2014, 19:53
Quote

Hi kongo and sandy!

I think the issue is in the way controller displays and saves values to .properties file. If you look in the .properties file that kongorilla attached few posts above, you'll see that controller.grid.size value is 41.5 but is displayed as 41. This might be because controller displays the value with decimal precision 0 (meaning there'll be no decimal part displayed at all) though control has 0.5 step increment. Thus when changing this value it is possible to change it for only 0.5 and not get visual confirmation of this. And grid sizes that are not integer result in those gaps.

Hope that makes sense to you guys and doesn't sound too convoluted.
Below is the code from controllerSetup.pde file which can fix that problem, I guess.

 else if (MODE_CHANGE_GRID_SIZE.equals(key))
      {
        n.setValue(getGridSize());
        n.setMin(20);
        n.setMultiplier(1);
      }
sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: March 10, 2014, 21:15
Quote

Nosetinker, I think you're exactly right, good spot, thanks! I saw the 0.5 in the settings file, but assumed that was me rounding up somewhere. Didn't think to look in the control setup.

So yes, right, the reason it alternates is because 41.5 is rounded down to the int 41 when it comes to building the commands, but the next increment is actually 41.5 + 41.5, aha, and that also explains why it seems to be a bit unpredictable even when the numbers _look_ the same! Ace! So one pixel is half a step too high, and the next pixel is half a step too low. Ha.

The reason the multiplier was less than 1 was so that it was controllable, so I've added a round-down in the setGridSize method. That's great. Thanks everyone, I'll get it sorted asap.

sn

sandy
Administrator
Posts: 1384
Permalink
sandy
Post Re: Mind the Gaps
on: March 10, 2014, 22:30
Quote

http://www.polargraph.co.uk/2014/03/mystery-of-the-gappy-drawings-new-controller-version/

Pages: [1] 2
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.109 seconds.