© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
10 replies
Sebastian

❔ ✅ Applying math to programming

Hi,
this is not necessarily a C# question and more question towards math and programming. I am using C# as my language so I hope it's okay to ask this here.

I have always been struggling with applying math equations and so on to programming and I am finally tackling this mental block I have and trying to force myself to learn more.

I have a 2 dimensional array (grid) of 0 or 1 (which size is set dynamically)
I would like to use
x^4 + y^4 = 1
x^4 + y^4 = 1
to fill it out.
https://www.wolframalpha.com/input?i=x%5E4+%2B+y%5E4+%3D+1

How can I draw this shape in it?
I would also like to go beyond and how could I fill it out or reverse fill it out in my grid?
Just a small pointer on how to use math to achieve some different result would help help so much.
Thank you.

Example (With bigger size edges would be smoother):
1 1 1 1 1 1 1 1 1 1
1 1 0 0 0 0 0 0 1 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 1 0 0 0 0 0 0 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 0 0 0 0 0 0 1 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 1 0 0 0 0 0 0 1 1
1 1 1 1 1 1 1 1 1 1
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

String to math
C#CC# / help
4y ago
math
C#CC# / help
3y ago
✅ Incorrect math
C#CC# / help
4y ago
❔ C# Math.Min/Math.Floor & Foreach/for
C#CC# / help
3y ago