--
You received this message because you are subscribed to the Google Groups "EggBotUser" group.
To post to this group, send email to eggbo...@googlegroups.com.
To unsubscribe from this group, send email to eggbotuser+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/eggbotuser?hl=en.
This is what the "Stretch" extension does in the v2.1 Eggbot software
release. See
http://wiki.evilmadscience.com/Stretch
BTW, there's another distortion going on as well. Namely, eggs are longer
than they are wide. This also causes eggbot "pixels" to not be square on
eggs. (On spheres, you're okay -- they're square.)
When the egg motor rotates the egg 1 step, the surface distance covered
by the pen tip is shorter than when the pen motor moves the pen 1 step.
Put differently, the equatorial circumference of the egg is significantly
smaller than the polar circumference. Call the equatorial circumference
E and the polar circumference P. We know that E is considerably smaller
than P. (For a sphere E equals P.) Now, one egg motor step - one step
in the X direction - at the equator is E / 3200. But, one pen motor
step - one step in the Y direction - is P / 3200. So, the pixel at the
equator has width E/3200 and height P/3200. Since P > E, this pixel is
not square: it's rectangular.
To counter this distortion, stretching your entire picture horizontally by
around 140 to 150% is needed. I find that I use the Stretch extension first
to counter the distortion Chuck described AND then I do a further horizontal
stretch of 140 to 150% to deal with the pixels not being square.
Regards,
Dan
I'm a fellow artist, though my medium is motion control-- Eggbot
being my first "piece," twenty years ago. While my background
trained me in lots of "-ics" (including the Calculics), my favorite
by far is the bas-ic. I completely understand what you want to do
(thank you for providing links to pics!), and you definitely do not
want to use Dan's STRETCH extension for that. You are correct-- it's
for patterns that do not tile all the way round.
There are two distortions at play here-- but both are easy to
understand, and one is "correctable." The first comes from mapping a
rectangular drawing (on the Inkscape screen) to a spherical
geometry. Just as a grid of parallel vertical lines in Inkscape will
map to the egg like longitude lines on the globe (converging as they
approach the poles), all geometry gets crunched the more polar it
gets. This, as far as I'm concerned, is a plus for geometric designs
that seamlessly tile the egg. The most common question I hear: "how
did you figure out how to fit the drawing on the egg?" Of course, I
didn't. It's automatic-- a by product of the geometrical
transformation (done mechanically by Eggbot) from Cartesion (flat
X/Y) to spherical (lat/long). There's nothing you can do about this
distortion, with regard to tiling the egg. STRETCH attempts to
counter this distortion, but it cannot do it seamlessly all the way round.
The second distortion is really just an aspect ratio issue, and is
easy to correct-- that from the pen-axis's circumference being
greater than the motor-axis's in real eggs. Simply widen your
drawing by ~150% (less for rounder eggs, more for longer eggs), or if
you have, say, a repeated tiling pattern, that already fits
horizontally on your 3200 pixel wide Inkscape template, squash it
vertically ~67%. Try it with some simple shapes to convince yourself
how *basic* the cause and correction of this second distortion
is. The first time I discovered this was when I tried plotting faces
I had traced (using trace bitmap) on eggs. They had looked great on
bulbs, but on eggs looked way too skinny. What the?? Took me a good
while to grasp the simple reason.
b
In general, I agree. If however, the goal is to have a column which spirals around the
egg and appears to have constant width, then what I would experiment with is the following:
1. Draw a vertical column.
2. Apply the "stretch" extension.
3. Skew (shear) the result to then get a column which spirals around the egg.
If, however, you want the columns to actually reach the poles, then the stretch extension
will not be useful. See the attached images for pictures of steps 1, 2, amd 3 applied
to a vertical column on the left and just steps 1 and 3 applied to the vertical column on
the right. The fourth and final image is the result drawn on an egg. The extension helps
to counter the pinching or tapering near the poles which occurs in the column's width.
What the extension does is somewhat off for an egg as the extension applies the math
applicable for a sphere and not for an egg. I could modify the extension to also support
eggs. (However, I first wanted to see just how useful the extension is to other people
before putting any further work into it.)
Regards,
Dan
You wrote: "The circles are circles on the drawing, but ellipses when
printed on the egg; elongated vertically."
A good example of this would be the "Garish_overkill.svg" file from the
Eggbot example set. The band around the middle of the egg is made of
circles, but when we plot it, we get something like this:
http://www.flickr.com/photos/oskay/4820280418/
All of the "circles" that were drawn on the egg actually have plotted as
ellipses, elongated vertically.
Why is this? The core reason is that eggbot units-- as drawn on your
screen --refer to *angle,* not *distance* on the printed object.
In more detail: The units on the screen are such that 1 pixel up or down
corresponds to one step of one of the pen motor, where it takes 3200
steps to make a revolution. And 1 pixel left or right corresponds to one
step of one of the egg motor, where it takes 3200 steps to make one
complete revolution. If you remember (and here's the fourth grade part)
that there are 360 degrees in a circle, each pixel on the screen
corresponds to exactly 360/3200 = 0.1125 degrees of angle. For example,
800 pixels corresponds to 90 degrees of motion-- 1/4 of a full turn.
So how does the fact that the screen shows *angle,* not *distance* lead
to elongated circles on on eggs? This is a consequence of the fact that
larger circles have larger circumference (i.e., perimeter).
Let me elaborate. Suppose that you have a compass (the drawing kind, not
the directional kind) and are drawing some pencil arcs on a piece of
paper. You draw two 90-degree arcs (1/4 circle arcs) from the same
center point. You draw one of them with a radius (distance from pivot to
pencil tip) of one inch, and the other with a radius of two inches. Both
arcs span the same angle, 90 degrees. But the total length of the two
pencil marks is *very different*-- the arc that was drawn with the larger
radius is much longer.
Now suppose that you go back to the Eggbot, and you plot on two spherical
glass christmas ornaments: one with one inch radius (i.e., two inch
diameter) and the other with two inch radius (i.e, four inch diameter).
On each ornament, you draw a single straight black sharpie line along the
equator, but 800 pixels wide. Since 800 pixels corresponds to 90
degrees, each ball will have an arc drawn on its surface that covers 90
degrees.
Viewing each ornament along its poles (or using a flexible tape measure
or ruler), you would see that the arc lengths drawn on the ornaments are
exactly the same as those drawn with the compass on paper, and that's
because they are just the same type of thing: 1/4 circle arcs with radius
of one inch or two inches. These arcs are also fundamentally made in the
same way as the compass: The distance between the pivot (the axis that
the egg-motor turns along) and the pen tip is again one inch or two
inches, only this time it is the paper, not the compass, that moves in a
1/4 circle.
Now, suppose that you put the small ornament back in the Eggbot, and draw
a second 800 pixel wide line, but this time perpendicular to the equator
(i.e., along a longitude line, not along a latitude line). If you
checked with the tape measure, you would find that the two arcs on the
ornament are both the same length, because both of them are 1/4 circle
arcs with radius of one inch. This is again because we're essentially
doing the same thing as the compass: the distance between the pivot (the
axis that the *pen motor* turns along in this case) is one inch, so it's
exactly the same situation.
Likewise, if you repeated that procedure with the large ornament, you
would find that the two arcs on its surface are both the same length,
because both of them are 1/4 circle arcs with radius of two inches.
Finally, what if you want to draw on an egg-shaped object? The problem
is that there is no longer a single radius that defines the shape.
Instead, there are two effective radii (or radiuses if you prefer). These
effective radii are (as before) given by the distance between the pen tip
and the pivot point-- only this time, those two distances are *not the
same.*
Suppose that when the eggbot is set up correctly to draw on the object,
the distance from the egg-motor axis to the pen tip is one inch, and that
the distance from the pen-motor axis to the pen tip is two inches. In
that case, an 800 pixel wide line drawn horizontally-- where the radius
is smaller -- will give a much shorter line than an 800 pixel line drawn
vertically --where the radius is larger. The two different arc lengths
will be the same as the two different-radius arcs drawn with the compass,
because they are just the same thing: 1/4 circle arcs drawn with a radius
of one or two inches.
How do you correct for this particular sort of egg-borne distortion? As
Bruce points out, "just an aspect ratio issue, and is easy to correct."
Just stretch everything horizontally, or (for a wrap-around pattern like
mine) compress it vertically. Exactly how much to compress it can be
determined by measuring the two effective radii for your actual setup
(with the pen down!), and will actually depend on the particular egg.
Arc length is directly proportional to radius, so if you did have an egg
with twice the radius in one direction (like our hypothetical example),
you'd want your circles to be twice as wide as they are tall. For garden
variety chicken eggs, a ratio of about 2/3 as wide as tall is a good
starting point.
As far as the rest of the distortion, there are many possible sources.
Some can be due to misalignment in your Eggbot, and some are fundamental.
The big, "bad" one is that flat planes and curved surfaces are
fundamentally different beasts. There are hundreds of possible ways to
represent a map of the earth on a flat sheet of paper; there's a whole
science of "map projections" built around it. The particular projection
that we use is called the "equirectangular projection" -- which means
that flat distance units correspond to angles, as we've discussed. You
can read more about it here:
http://en.wikipedia.org/wiki/Equirectangular_projection
There is a graphic on that page that shows the sort of polar distortion
that comes from unwrapping a sphere onto a flat plane in this way:
http://en.wikipedia.org/wiki/File:Tissot_indicatrix_world_map_equirectangular_proj.svg
Dan's Stretch extension can compensate for this distortion for relatively
small objects-- for a single point of view -- and that's genuinely the
best that *can be done* if starting with a flat drawing. If you really
want to draw on a sphere without distortion, there's exactly one way to do
it, and that's to begin with your drawing on a sphere. For computer
graphics, that would mean a drawing program that represents your canvas,
as you draw, by a 3D sphere. Could be done, but it wouldn't be easy.
-Windell
If you're running v2.1 or later of the Eggbot extensions, then there's
a really easy answer. At the end of this message, I'll tell you how
to check the version if you are unsure.
Before plotting, make sure that the option "Start with pen centered"
is checked in the Eggbot Control extension. Look at the "Options"
tab. If it is not checked, then check it and click the "Apply"
button.
With "Start with pen centered", wherever you park the pen at the
start of your plot will correspond to the center of your Inkscape
drawing page (template if you prefer). So, the upper half of your
page will then be drawn above where the pen is parked and the lower
half of the page below.
In the above, I was careful to write "page" and not "drawing". If
all of your drawing is in the upper half of the page, then all of your
drawing will then be drawn above where the pen was parked. To get
the drawing centered, just center the drawing in the Inkscape page
and then "center" the pen over the egg at the point YOU envision
as being the center for your drawing on the egg.
Regards,
Dan
P.S. To check the Eggbot version, just pull up the Eggbot Control
extension. Click on that far right tab with " * " as its label.
The info shown by that tab includes the version number. It's probably
something like 2.1.4 which means that you have "2.1".
There’s a problem though. The first circle/ellipses are drawn
seamlessly. The subsequent circle/ellipses are drawn almost as though
they are a tightening spiral. You can see in the photographs that the
starting point of the drawn circle/ellipse does not meet up with the
ending point of same.
This happened in a previous attempt at this exercise and I though I
was being sloppy. So I went back and did that epoxy thing to my
bushings and shifted the frame so the egg was centered better. I also
double checked that the left side of the frame was tightened down on
the same markings as the right side of the frame. I also adjusted the
pen arm to make the pen sit exactly over the axis of rotation.
So what would cause this shift in rotation as a shape is being drawn?
Within a layer, the Eggbot plots items "back to front" -- where items
drawn first are in the back, and items drawn subsequently are in front of
those. You can also ask Inkscape to move things forward or backward, as
needed.
Alternately, we have a "Reorder paths" extension that tries to re-order
items to reduce the amount of "air time" -- movement with the pen up.
It has an entire section on layers:
http://en.flossmanuals.net/Inkscape/Layers
Best,
Lenore