Discuss Scratch

ThatOneCoder435
Scratcher
100+ posts

A new operator block that can output special math variables e.g. π, i or e

Would look something like this:

([pi v]::operators)
Za-Chary
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

Complex numbers are certainly cool, but what are some interesting ways that i could be used in a Scratch project?
ThatOneCoder435
Scratcher
100+ posts

A new operator block that can output special math variables e.g. π, i or e

Za-Chary wrote:

Complex numbers are certainly cool, but what are some interesting ways that i could be used in a Scratch project?
Probably would only be used for fractal engines, that's all I can think of
k7e
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

Seems hard to drag the “()” block…
CST1229
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

k7e wrote:

(#4)
Seems hard to drag the “()” block…
You have to specifically click and release on a dropdown to open it in 3.0, you can drag the block by dragging a dropdown just fine. (Though it is harder to click the block to see its return value.)
ajskateboarder
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

You can use 3.14159265 for pi. It's accurate enough for most situations
gdfsgdfsgdfg
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

ok

set [pi v] to [3.141592653589]
([e^ v] of (1)::operators)

idk about the i though

Last edited by gdfsgdfsgdfg (May 30, 2023 12:21:32)

medians
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

CST1229 wrote:

k7e wrote:

(#4)
Seems hard to drag the “()” block…
You have to specifically click and release on a dropdown to open it in 3.0, you can drag the block by dragging a dropdown just fine. (Though it is harder to click the block to see its return value.)
Hold on, does it now try to open the dropdown or something if you try to click any part other than the arrow?
Minecraft_Master3964
Scratcher
500+ posts

A new operator block that can output special math variables e.g. π, i or e

gdfsgdfsgdfg wrote:

ok

set [pi v] to [3.141592653589]
([e^ v] of (1)::operators)

idk about the i though
([sqrt v] of (-1))
But I'm pretty sure it returns Infinity, not i…
medians
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

Minecraft_Master3964 wrote:

gdfsgdfsgdfg wrote:

ok

set [pi v] to [3.141592653589]
([e^ v] of (1)::operators)

idk about the i though
([sqrt v] of (-1))
But I'm pretty sure it returns Infinity, not i…

It returns neither of those, it returns “NaN”
Edit: Any sqrt of anything below 0 is NaN in Scratch by the way.

Last edited by medians (May 30, 2023 12:39:45)

k7e
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

medians wrote:

CST1229 wrote:

k7e wrote:

(#4)
Seems hard to drag the “()” block…
You have to specifically click and release on a dropdown to open it in 3.0, you can drag the block by dragging a dropdown just fine. (Though it is harder to click the block to see its return value.)
Hold on, does it now try to open the dropdown or something if you try to click any part other than the arrow?
medians
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

k7e wrote:

medians wrote:

CST1229 wrote:

k7e wrote:

(#4)
Seems hard to drag the “()” block…
You have to specifically click and release on a dropdown to open it in 3.0, you can drag the block by dragging a dropdown just fine. (Though it is harder to click the block to see its return value.)
Hold on, does it now try to open the dropdown or something if you try to click any part other than the arrow?
Oh my god that’s annoying, just make them separate blocks then or have:
(constant [pi v] ::operators)

Last edited by medians (May 30, 2023 13:41:32)

KangaCoder
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

While I think complex numbers and irrationals like e are pretty cool, isn't Scratch designed for kids? While it would be interesting to see an i block used in a project, will elementary/early-middle school kids really be using it in their projects? It might confuse them; thinking i was a variable or something.
Za-Chary
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

KangaCoder wrote:

While I think complex numbers and irrationals like e are pretty cool, isn't Scratch designed for kids? While it would be interesting to see an i block used in a project, will elementary/early-middle school kids really be using it in their projects? It might confuse them; thinking i was a variable or something.
To be fair, kids won't really be using the sin and cos blocks in their projects. I didn't learn the meaning of sin and cos until my last year of middle school, and I was in an “advanced” math class — many students don't learn sin and cos until high school or even college. (Granted, i would probably be learned even later than that, but whatever.)

Minecraft_Master3964 wrote:

([sqrt v] of (-1))
But I'm pretty sure it returns Infinity, not i…
This can be tricky since there are two complex square roots of -1: they are i and -i. Perhaps it should return the principal square root (which is i in this case).
medians
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

Za-Chary wrote:

This can be tricky since there are two complex square roots of -1: they are i and -i. Perhaps it should return the principal square root (which is i in this case).
Yeah since it doesn't normally do that with the sqrt block.
NIKI-KOLCHAGOV
Scratcher
500+ posts

A new operator block that can output special math variables e.g. π, i or e

For the e i think it would be great but idk about the i and pi
I also think that while its cool to have complex numbers it makes it more complicated
KangaCoder
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

Za-Chary wrote:

To be fair, kids won't really be using the sin and cos blocks in their projects. I didn't learn the meaning of sin and cos until my last year of middle school, and I was in an “advanced” math class — many students don't learn sin and cos until high school or even college. (Granted, i would probably be learned even later than that, but whatever.)
True, but at least there's a pretty good use for sin and cos blocks for more advanced coders, however it appears (in this thread) there is a very small amount of potential use for an i block - compared to trig functions. And like you said, imaginary numbers could be learned even after sin and cos. (There are “workarounds” for the other two that aren't perfect but can get the job done, like setting a variable equal to the approximation of pi or e, so I don't see the need for a specific block for those.)
k7e
Scratcher
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

Bump
Paddle2See
Scratch Team
1000+ posts

A new operator block that can output special math variables e.g. π, i or e

It looks like this is a duplicate topic of this one over here so I'll close it to keep the conversation all in one place.

Please use the existing topic in the link above.

Powered by DjangoBB