Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • \$\begingroup\$ @Jitse I forgot to scale back the x and y at high values of z. Effectively the points defined a cylinder. It's fixed now but it cost a lot of bytes! I could save a few if the the output can be expressed with a complex number [z, x+yi] I'll leave it as it is unless you say that's OK. \$\endgroup\$ Commented Sep 9, 2019 at 9:58
  • \$\begingroup\$ Looks good! I really like this approach. For consistency, the required output is three floats, so I suggest leaving it like this. \$\endgroup\$ Commented Sep 9, 2019 at 10:09
  • \$\begingroup\$ Why not use z*z instead of z**2? \$\endgroup\$ Commented Sep 9, 2019 at 21:06
  • \$\begingroup\$ @ValueInk yeah thanks I realised I'd missed that z*z. I've edited it in now. The other thing I could do is replace rand*4 with something like z*99 or x*9E9 (effectively limiting the possible values to a very fine spiral on the sphere) but I think that reduces the quality of the random. \$\endgroup\$ Commented Sep 9, 2019 at 22:25