# Capture Point from Sketch?

**URL:** <https://cl.desmos.com/t/capture-point-from-sketch/7545>\
**Category:** Questions\
**Tags:** sketch\
**Created:** [November 21, 2024, 10:10pm UTC](https://cl.desmos.com/t/capture-point-from-sketch/7545 "2024-11-21T22:10:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![French](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/french/32/4354_2.png) [@French](https://cl.desmos.com/u/French)\
**Post date:** [November 21, 2024, 10:10pm UTC](https://cl.desmos.com/t/capture-point-from-sketch/7545/1 "2024-11-21T22:10:34Z")

</div>

Hi All!

I’m trying to work on an idea I had about having students guess the location of a missing vertex of a regular polygon. My goal is to have them estimate where the point is and then have the screen disable and show how close they were (I can code that part)

My request is involved with how to capture the coordinates of the point once the point is plotted. I have already put in the currentX and currentY, I just need to know how to capture the history of the point once the strokecount=1.

> **[Guess the Point • Activity by TJ French](https://classroom.amplify.com/activity/673fab9c239193147405db5d)**
>
> by TJ French

Thanks!

---

<div class="post-metadata">

**Author:** ![Guzman\_Tierno](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/guzman_tierno/32/6149_2.png) [@Guzman\_Tierno](https://cl.desmos.com/u/Guzman_Tierno)\
**Post date:** [November 22, 2024, 7:23am UTC](https://cl.desmos.com/t/capture-point-from-sketch/7545/2 "2024-11-22T07:23:15Z")

</div>

Something like this …

[https://teacher.desmos.com/activitybuilder/custom/6740297f1f7cac2b144470c2](https://teacher.desmos.com/activitybuilder/custom/6740297f1f7cac2b144470c2)

btw: I like your idea, I gave you some options.

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [November 22, 2024, 2:06pm UTC](https://cl.desmos.com/t/capture-point-from-sketch/7545/3 "2024-11-22T14:06:53Z")

</div>

If you want a history of coordinates, you’ll need an action button to use captures. On button press, `capture(" ")` collects a numeric value and stores it in a `numberList`. Similar to some of @Guzman_Tierno’s, here is how to use captures and some related sources.

```auto
s = sketch
capture("X"): s.sketch.pointXValues[1]
capture("Y"): s.sketch.pointYValues[1]
xHistory = this.history("X")
yHistory = this.history("Y")
lastX = this.lastValue("X")
lastY = this.lastValue("Y")

```

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [November 22, 2024, 2:29pm UTC](https://cl.desmos.com/t/capture-point-from-sketch/7545/4 "2024-11-22T14:29:35Z")

</div>

Here’s a different way using a graph with actions instead. You can hide the green points by adding a point into the list and resetting after editing your display parameters.

Side note: currentX and currentY can pose some accessibility issues for touchscreens and keyboard navigation, so use it sparingly if possible.

> **[Examples for Forum • Activity Builder by Desmos Classroom](https://teacher.desmos.com/activitybuilder/custom/659c0a8340157b4014b5cac0#preview/0b07cda6-06fa-4af8-8548-2319a1223b4c)**
>
> by Daniel Grubbs
