Noops homepage
Noops challenge home

vexbot

Hey there! We haven't met yet. Connect your GitHub account to enter the challenge.

đź‘‹ Meet Vexbot

Ah, Vexbot. She's not really vexing—she just wants to keep everything in a straight line. And that's all she can talk about. Straight lines.

With every request, Vexbot will send you up to a thousand lines—two pairs of coordinates and a speed.

↗ What can you do?

Just lines? That seems pretty boring...

Sure, you could just draw one line...

Single line example

But when you draw a thousand it starts to get interesting...

Many line example

And when you start layering them...

Buildup example animation

Or you could ask the nice Vexbot to connect all the lines for you...

Connected line example

And we haven't even gotten into what happens when you animate lines individually...

What's next? That's up to you!

✨ A few ideas

There are millions of things you can do with Vexbot, but here are a few ideas to get you started:

  • Bring it to life: With the connected parameter turned on, our little Vexbot gives you a thousand-jointed creature you can have wriggle across your screen.
  • Pickup Sticks: Ever play the game? Now's your chance to build it.
  • Don't touch the lines: Add a hero whom you navigate around the lines to a destination.

Have an idea of your own? Create an issue and we'll add it to the list!

🤖 API basics

You can request up to 1,000 pairs of coordinates, specify the magnitude and whether you want your lines connected, and set maximum x and y boundaries.

There's a single endpoint: https://api.noopschallenge.com/vexbot

The endpoint accepts five parameters, all optional:

  • count (optional, numeric): Between 1 and 1000. Number of lines to return
  • magnitude (optional, numeric): Between 1 and 100,000. Maximum length of lines.
  • connected (optional, numeric boolean): 1 or 0. If connected===1, then the b coordinate of each line will be the a coordinate of the next.
  • width (optional, numeric): Between 10 and 100,000. Maximum width of returned points.
  • height (optional, numeric): Between 10 and 100,000. Maximum height of returned points.

The endpoint returns a JSON object with an array named vectors of n length. Each item in the vectors has three properties: a, b, and speed.

Example return for a single line:

{
  "vectors" : [
    {
      "a": {
        "x": 743,
        "y": 147
      },
      "b": {
        "x": 60,
        "y": 601
      },
      "speed": 71
    }
  ]
}

Read the complete API documentation.

Connect to GitHub

Participants

See who has recently forked this repository...

Other challenges you might like

Meet

hexbot

hexbot hero

Hex codes everywhere

A different color with every ping

Level 1

Want to hear about new challenges and updates?

Meet the Noops

Sponsored by GitHub