Pen down / pen up

when I make a project that requires a single dot to be drawn you always have to do pen down then move then move back and pen up. I feel it would be better if the pen down put a dot of the pen size so that in order to draw a dot you would just have to do pen down then pen up.

Moving zero steps work too, that doesn't require movement to draw a dot:
untitled script pic (44)

This is Effortless, Effective, and Efficient.

If you do a change x by 0 you also get your dot.

oh didnt know. but still why cant it just be part of the pen block

Why not create a custom block like this:
untitled script pic (46)

Or you can use a JS function that starts leaving a trail immediately after the pen is down:
untitled script pic (45)

Because those are two different actions! All else being equal, a primitive should just do one thing. It's really easy to combine two primitives into a custom block (for example, a DOT block), but it's not easy to get only half of what some primitive does.

You might have a custom block that draws some shape that includes a few dots here and there, and yet in some situation you might call that block with the pen up (e.g., because it leaves the sprite someplace other than where it started, and you want the motion without the drawing). So your custom block could have MOVE 0 STEPS at various places in the code, but on some particular call to the block you don't actually want to see dots.

Alternatively, someday I hope we have PEN REVERSE, which makes it so moving the sprite exclusive-ors with the existing picture, and you could then do the MOVE 0 STEPS under PEN REVERSE.

Controlling the pen state is just a different thing from moving/drawing. Different palettes, Pen vs. Motion, even.

i need more ideas

Just do a web search for "programming project ideas"!

im trying to work on my vector thing but its so complex. i tried making this pixel line follower and i cant tell what the error is

Umm. I'm not gonna debug your code for you. It's pretty ugly. Is there a way you can use matrix operations to get the neighbors of your position and check them all at once?

i fixed it. just now doesnt work the way i want it. i feel like no matter what i do i cant figure out how to make an image vector

I am so not a graphics person. Maybe ask someone else...

who

I dunno, you know them all at least as well as I do. Or just ask the world and see who replies.

no one did

It partially works.
Green trails is a sensor sprite trajectory.
Stage (67)

Stage (68)

Stage (69)

It can't trace backwards.

ik. dyk how to convert a bitmap image to a smooth drawn pen one

Minimal outer scan for convex shapes :link:
Red dots outline the shape.

Stage (70)

But improvements are necessary :wink:
Stage (71)

that defeats the point of the code. the goal is to create a smooth outline of a shape (meaning no pixels)

Possibly interpolating the dots with lines is a good idea for dardoro's script, do not you? :nerd_face: :ok_hand: