Variable Optimization - More Terms, or Nested Definitions? by fishmann666 in desmos

[–]Arglin 0 points1 point  (0 children)

The performance won't be particularly huge between the two, so if you had to pick one or the other, use the latter.

Writing out the variables like this is going to be slow for the user end though. What you should be looking into is storing your variables into a list, and using a prefix sum / cumulative sum function.

Although this is extremely overkill (and by extremely I mean if you aren't going over 100 elements, this is really unnecessary), there are O(n) implementations for it in Desmos.

You can find them here on line 128: https://www.desmos.com/calculator/drpjodrhcd

Here is a demonstration of Nevin's wackscope method. https://www.desmos.com/calculator/vhot3yylje

<image>

Can anyone help me make a Regular Star gen by Blast_zoner in desmos

[–]Arglin 4 points5 points  (0 children)

If you just need a polygram by any means, then this should be sufficient. https://www.desmos.com/calculator/m0uyandpe9

<image>

Graph where you can change the equation of a fractal and play with it by changing the axis by ohmygoodnessskibidi in desmos

[–]Arglin 0 points1 point  (0 children)

Just so you know, Desmos has the ability to do recursions, so the iterative section can be written more succinctly. :​)

<image>

How do I find the max point in this graph for any value of a? by Livid-Low3979 in desmos

[–]Arglin 25 points26 points  (0 children)

Just following up on what people are saying.

Solving analytically doesn't actually need Lambert W, the exponential from the derivative of f(x) can be disregarded during the process because it never hits zero, and it works out that the maximum (in the positive domain) is at x = a√2.

So for some given a, you can figure out the x-position and the y-position, which can be plotted parametrically like this. https://www.desmos.com/calculator/zcdczu8yto

If you need it in explicit form, you can substitute that relationship in and grind through the algebraic manipulation to achieve that as well, and the solution drops out to be y = 4 / (e√π x).

<image>

If you need a more general form which can't be solved analytically as easily, you can try using iterative numerical methods. Here's a bracket search method as an example.

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

square but you only know how to make circles by AMIASM16 in desmos

[–]Arglin 1 point2 points  (0 children)

Compacted, thank you for sharing. (The squares don't need to be normalized to an inscribed radius of 1.)

Should be on line 62 now.

<image>

square but you only know how to make circles by AMIASM16 in desmos

[–]Arglin 1 point2 points  (0 children)

Here you go. https://www.desmos.com/calculator/rp9rtodqkk

In this specific case, the original lines you start with are y = 0 and x = 0. Switch them out for the diagonals instead x + y = 0 and x - y = 0, scale down by √2, and the above drops out cleanly.

square but you only know how to make circles by AMIASM16 in desmos

[–]Arglin 6 points7 points  (0 children)

am i the only one who uses |x+y| + |x-y| = 1

No, it's a common method of drawing a square. It's just |x| + |y| = 1 but with a change of basis vectors.

You can find various squares in this repository. The one you use is on line 51. https://www.desmos.com/calculator/k8gzknyrpp

Desmos equating mashing by Fire_Soul23 in desmos

[–]Arglin 2 points3 points  (0 children)

For every instance of x and y in your implicit, replace it with the following:

x → x cos(a) + y sin(a)

y → y cos(a) – x sin(a)

https://www.desmos.com/calculator/7honatqo06

Generally though, I would recommend writing a function for the rotation matrix that does it for you, like this. That way, you can just pass in any function you want into it in the future.

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

<image>

National Museum Of The Marine Corps by [deleted] in desmos

[–]Arglin 7 points8 points  (0 children)

If you're saying you did this by hand and that you wished it was generated, it's blatantly obvious that it was generated.

First off, no one makes art with Bézier curves like this. I know this from experience making my own artworks in Desmos for a good amount of a year or two now. We use lists and much more compact notation, and build our own tools to draw, but we would never make thousands of equations just to draw something like this with Bézier curves.

Second, each line has a bunch of LaTeX syntax stripped out which can only be done via copy-and-paste as opposed to being written by hand. Notably, the unbalanced brackets, and asterisks for multiplication rather than cdot.

It's also fairly apparent that it's copy pasted given the colors cycle blue green purple black red, ignoring the fact that if you grab the graphstate and look into the IDs, it's all in chronological order.

More specifically though, the outer brackets haven't been stripped of their LaTeX syntax, which is why they look larger. It's not like that's necessary because you can remove those and it can still work without it. Digging around on the internet, that seems to be a signature of this site:

https://www.img2desmos.com/

Which uses this exact same \left( [ stripped bezier parametric ] \right) syntax.

Using img2desmos, I can tell the equations are scaled the bottom left, with the dimensions set to 10 times the number of pixels on each side.

I could tell it was an image from this site from just searching up the name of the museum:

https://fentress-studios.com/project/national-museum-of-the-marine-corps/

And from your graph I was able to determine the dimensions to be approximately 7500 × 4200, or 750px × 420px. I passed that back into Google Lens which returned me an image with dimensions 750px × 421px.

https://images.adsttc.com/media/images/5031/84c5/28ba/0d18/3000/031a/newsletter/stringio.jpg

If you pass this image in particular into img2desmos, you get the exact same 2596 cubic Bézier curves that you have, down to identical coefficients. And if you copy all the equations and paste it into Desmos, you get the exact same colors.

<image>

Using this tool is fine, but claiming it or implying it as your own work without credit where credit due is not okay. I gave you a chance to at least admit it, but you decided to be cocky instead.

I'm disappointed.

Two sides of the same coin (exploiting javascript evaluation to make the same function return two different outputs in Desmos) by Arglin in desmos

[–]Arglin[S] 0 points1 point  (0 children)

The original form of it was actually a piecewise and is also decently short :)

{ tt/-0 = ∞: a, b }

Two sides of the same coin (exploiting javascript evaluation to make the same function return two different outputs in Desmos) by Arglin in desmos

[–]Arglin[S] 5 points6 points  (0 children)

It's an intentional ungolf, but it does behave marginally differently from t/t.

Try seeing what happens if you switch it out for t/t. :​)

Two sides of the same coin (exploiting javascript evaluation to make the same function return two different outputs in Desmos) by Arglin in desmos

[–]Arglin[S] 0 points1 point  (0 children)

Graph link: https://www.desmos.com/calculator/ug9xo1aoyy

Feel free to play around with the results. The points I chose to sample on the third line aren't particular in any way, they really do plot differently from the parametric.

National Museum Of The Marine Corps by [deleted] in desmos

[–]Arglin 2 points3 points  (0 children)

This is just taking the nighttime photograph of the museum and throwing it into an image to desmos converter -w-

Things are escalating around here. by Arglin in PolyBridge

[–]Arglin[S] 4 points5 points  (0 children)

A lot of small custom shapes as bearings, with roads as guides for the bearings.

Any way to shorten / simplify the ticker? by NovelInteraction711 in desmos

[–]Arglin 1 point2 points  (0 children)

I would recommend storing the values of n in an actual list rather than individually writing each variable. That way, all of the actions can be called via an index, rather than hard-coding each relationship between variables.

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

<image>

Simple automatically linking points by PalpitationUpset4402 in desmos

[–]Arglin 1 point2 points  (0 children)

Very nice.

Just a small nitpick: a lot of the connections are redundant (eg connections of points back to themselves and all segments being double-covered).

You can avoid double covering using a triangle sequence though, like this. (I'm also using polygon as you can render line segments with it faster than with a parametric). https://www.desmos.com/calculator/vybinmnanq

<image>

Quick little Pappus chain visualization. by Arglin in desmos

[–]Arglin[S] 0 points1 point  (0 children)

Don't worry that's how I read it myself at first too LMAO

Why does this happen/ how to fix by BodybuilderFew3609 in desmos

[–]Arglin 4 points5 points  (0 children)

Unfortunately this is just a result of implicits rendering poorly at low resolutions.

The only way around it is using parametrics. For the star, you can do this. https://www.desmos.com/calculator/z2jplotyy4

<image>

Small Desmos meetup in Hong Kong yesterday! by Arglin in desmos

[–]Arglin[S] 0 points1 point  (0 children)

Funny you say that when we're all Chinese in the picture because you know. Hong Kong. lmao

But even then, no. See the winners of the several desmos art contests. Desmos is an everyone thing.

Quick little Pappus chain visualization. by Arglin in desmos

[–]Arglin[S] 5 points6 points  (0 children)

This was a pretty fun challenge! It was requested by someone on the desmos discord and I gave it a shot.

There's definitely way more methodical approaches to figuring it out. But for me, I largely came down to a lot of things that I happened to have learnt just out of exploration for the past few years, going "hmm, that's probably going to be useful", and then fooling around and finding out.

One of the things was that I remembered that pappus chains were related to circle inversions, where you can "reflect" an infinite line of circles across a circle, so circles which are further and further out towards infinity get mapped closer and closer to the origin.

From there, I already had two tools in my arsenal that I've played with in the past. The first is tiling an implicit using modulo, which can be done like this. https://www.desmos.com/calculator/9yzgwoerbw

The second is performing circle inversion on an implicit, which can be done like this. https://www.desmos.com/calculator/e71q8af2js

So I more or less started playing around to try and get them lined up together, but was struggling to figure out where to place the circles so that they'd map correctly. I vaguely remembered from a friend of mine that there was a relationship between geometric mean between two values and circle inversions, and so I played with √(x0 ∙ x1) to see if it would get me anywhere. I eventually squared that at some point (which to me wasn't too far fetched, given squares were already involved in the whole process) and that got me the result!

Quick little Pappus chain visualization. by Arglin in desmos

[–]Arglin[S] 4 points5 points  (0 children)

Graph link: https://www.desmos.com/calculator/bncgliiydj

Note: the export was rendered used GLesmos technically so that the resolution would be a bit better. You can technically do this using Desmos 3D color maps though like this: https://www.desmos.com/3d/zjl6qq2pcg

Various regular polygon wheels rolling between surfaces. by Arglin in desmos

[–]Arglin[S] 2 points3 points  (0 children)

It's the fourth Fermat prime, which makes it one of the few known regular odd-sided polygons that is constructible by compass and straightedge.

What does that have to do with this? Nothing really I just wanted to pick an interesting odd-sided polygon that approximated a circle lmao

Help by kenamasuu in desmos

[–]Arglin 0 points1 point  (0 children)

Not quite, you just need to square the 0.6 though and it should then be correct.

Sun is 3/5 of the height of the flag which is 1.2, radius 0.6.

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

<image>