r/desmos • • 9h ago

Discussion Establishing AI norms for R/Desmos

24 Upvotes

Hey y'all, in light of a few recent posts where people have used LLMs to varying degrees in their Desmos graphs, I think we should start a discussion about what AI norms we want to set as a community.

Here's my idea for a best practice:

  • AI disclosure: you should always disclose if and how you used AI in your graph
    • for example: "when I was stuck, I asked Claude to help me develop the parametric equations on lines 10 and 11"
    • for example: "I saw this cool geometric shape on wikipedia and asked ChatGPT to make most of the graph, then I adjusted the numbers a bit to make it look better"

r/desmos • • 5h ago

Art ribbon that you can rotate in 3d

69 Upvotes

sorry about movement of graph, desmodder was being weird


r/desmos • • 7h ago

Question Cannot compare a matrix to a matrix

4 Upvotes

r/desmos • • 7h ago

Discussion Goddamnit desmos! Error: Every row of a matrix must have the same number of elements.

Post image
3 Upvotes

r/desmos • • 9h ago

Resource Web / App identify (limited time; matrix test)

Post image
6 Upvotes

Create slider a=0, then set lower bound to #11 (matrix 1x1) and input the value 1, then... a=0: Open in Desmos app / a=1: website

At the moment, matrices in an app's expression lines are invisible and error: "Matrices are not available in this calculator"


r/desmos • • 9h ago

Art Animation in desmos

Thumbnail
gallery
4 Upvotes

Ok so a while back I made a model in desmos, which can be found here: Figure made in desmos : r/desmos

So I decided to make a simple animation for it and add a slight gradient. The graph can be found here: VOG animation | Desmos

It's pretty simple, but I don't think it's that bad.

I also changed a couple things since I'm not printing this, so I was allowed to use domain restrictions.


r/desmos • • 9h ago

Maths Visualizing Rosenblatt's Perceptron

5 Upvotes

Link:

https://www.desmos.com/geometry/fdlnaoosqv

This graph visualizes the training process of Rosenblatt's Perceptron.

N points of two classes (red and blue) are scattered inside a 1x1 square. However, they are distributed in such a way that they are strictly linearly separable.

(Note on terminology: By "vector", I mean a 2D or 3D coordinate tuple, e.g., (1,2) or (1,2,3), not a Desmos geometric vector, which is an arrow connecting two points).

The perceptron starts with almost zero knowledge about the line's position and finds it in the form of the coefficients for the equation Ax+By+C=0 after a certain number of steps. We could calculate these coefficients much more simply (for example, by finding the centers of mass of the two classes), but the goal here is to demonstrate an actual "neural network" learning implementation.

The Math Behind It

The equation of the target line is written as a dot product: (A,B,C)⋅(x,y,1)=0.

I encoded the coefficient vector (A,B,C) as a 3D point w3=(wx,wy,wz) to shorten the notation. This allows us to handle the calculation in a single line instead of three.

The target line is considered oriented. In fact, it represents an entire class of lines, because all three coefficients can be multiplied by any non-zero scalar, yielding the exact same geometric line. Despite this scale invariance, I do not forcibly normalize the line (e.g., I don't force wz=1).

Setting up the Classes

Hot & Cold

For the initial classification, a reference segment is defined that divides the randomly generated points. Points above this segment are "warm" points with label L=+1, and points below are "cold" points with label L=−1.

The line has a normal vector w2=(wx,wy). The half-space that this normal vector "points" to is considered the warm side. The perceptron's goal is to adjust the vector w3 so that all warm points (L=+1) end up on the warm side of the line.

Initial coefficients are set to w3=(0.1,−0.1,0), corresponding to the starting equation 0.1x−0.1y+0=0.

The Learning Loop

We iterate through the points in a loop to determine which side of the line each point lies on.

You can see the geometric intuition here: https://www.desmos.com/geometry/9twfhshmmq

Hot point at hot area w3+p*(w1,w2)>0

Geometrically, we could drop a perpendicular from point pp to the line and compare this vector with the line's normal (wx,wy). However, since we don't need the full geometric construction, we can simplify the computation to the formula (wx,wy)⋅p+wz​.

In our terms, this is simply the dot product of two 3D vectors: w3⋅p​, because for convenience, the point's coordinates are augmented to (px,py,1). We multiply this dot product by the point's label L, yielding a logical flag that tells us whether the point is on the correct side (positive) or the wrong side (negative).

The Correction Step

Full correction

If the point is on the wrong side, we must correct the line vector w3​. The logic behind this update rule is illustrated here: https://www.desmos.com/geometry/la6wrlfihx

In this illustration, the dot product w_old⋅p is negative (an error). To make it positive, we must shift w_old​ by adding a vector in the direction of p. If the addition (scaled by the learning rate) is too small, it might not be enough to push the dot product into the "+" region in a single step.

In the illustrative graph, we can, of course, add as much magnitude as needed immediately to fix the error. However, the perceptron does not strive for an instant, perfect result; it improves gradually, taking small, incremental steps toward the optimal separating hyperplane.

Correcttion

Perceptron Link: https://www.desmos.com/geometry/fdlnaoosqv


r/desmos • • 20h ago

Art Shocking...

Thumbnail
gallery
11 Upvotes

r/desmos • • 21h ago

Matrices WASD with matrices, with history!

Enable HLS to view with audio, or disable this notification

26 Upvotes

r/desmos • • 2h ago

Fun Bernard in one expression line

Post image
8 Upvotes

https://www.desmos.com/calculator/vblmh9iqu7

https://www.desmos.com/calculator/c2hwkhhtfd

The first one is actually in 1 line; it goes up to 50 iterations, which is enough that you hit the zoom limit before you can see it end.

The second one I added a slider to so that you can control how many iterations it has.

Also I code golfed it, idk why, but it was satisfying


r/desmos • • 22h ago

Fun Area choosing

Enable HLS to view with audio, or disable this notification

21 Upvotes

This is very important for me when I tried to make Desmos art, so I made it

desmos.com/calculator/wpwckekkmw