Designing function that draws specific output

In summary, the conversation discussed the batman curve, a graph created by a high school teacher that combines an ellipse, straight line graphs, and sinusoidal waves to draw the batman logo. The question was raised on how to combine these graphs and force certain points to be imaginary while hiding unwanted bits. The suggestion was to draw all curves on the same axes and use a function like $y=\sqrt{\frac{x-a}{|x-a|}}$ to make the desired curve imaginary in a certain range. Other methods were also mentioned, such as using knowledge of mathematics to construct different approaches and using the Heaviside step function.
  • #1
NotASmurf
150
2
Hey all, recently saw this video on the batman curve, designed by a high school teacher that draws the batman logo. He combined an ellipse, straight line graphs and some other sinusoidal wave then forced the functions to be imaginary at certain points to hide the unwanted bits. question, how does one combine those graphs? and secondly how does one force a graph to be imaginary at certain points without the bits you want to show being shifted? Any help apreciated.
 
Mathematics news on Phys.org
  • #2
Please provide a reference so we know what you are talking about.

You combine curves by drawing them all on the same axes.
You can make a curve evaluate imaginary in som range by multiplying it by a functunction like
$$y=\sqrt{\frac{x-a}{|x-a|}} $$ which is imaginary for x<a but 1 otherwise.

You can use your knowledge of maths to construct other approaches.
 
  • Like
Likes NotASmurf
  • #3
Thank you simon, that was just what I was looking for and I see terms that look like that in it.
Simon Bridge said:
You combine curves by drawing them all on the same axes.
Yes but i meant say I have y=mx+c and y=sin(x). is there a way to make a function from these that plots the points of both as though I was graphing them separately on the same set of axes?
 
Last edited:
  • #4
Yes, there are many ways and I showed you one above.
Lets call the function f(x) is such that it is imaginary for x<0 but 1 otherwise.
Youve seen how to make such a function above.

Then y=Re[g(x)f(a-x) + h(x)f(x-a)] will switch from g to h at x=a ... put g=mx+c and h=sin(x)

Also look up the Heaviside step function.
 
  • Like
Likes NotASmurf
  • #5
Brilliant, thanks again.
 

Related to Designing function that draws specific output

What is the purpose of designing a function that draws specific output?

The purpose of designing a function that draws specific output is to create a reusable block of code that can be called upon to perform a specific task. This helps to save time and effort by avoiding the need to write the same code repeatedly.

What are the key considerations when designing a function that draws specific output?

Some key considerations when designing a function that draws specific output include determining the input parameters, defining the expected output, considering any potential errors or edge cases, and ensuring the function is efficient and easy to understand.

How can I ensure that my function will draw the desired output?

To ensure that your function will draw the desired output, it is important to thoroughly test the function with different input values to see if it produces the correct output. You can also use debugging tools to identify and fix any errors in your code.

What are the advantages of using a function to draw specific output?

Using a function to draw specific output has several advantages, including increased efficiency and readability of code, easier maintenance and troubleshooting, and the ability to reuse the function in different parts of a program.

Can I design a function that draws specific output for any type of programming language?

Yes, you can design a function that draws specific output for any type of programming language, as long as you follow the syntax and rules of that particular language. However, the specific implementation may vary depending on the language and its capabilities.

Similar threads

Replies
6
Views
1K
Replies
4
Views
1K
  • General Math
Replies
8
Views
4K
Replies
2
Views
203
Replies
9
Views
4K
Replies
8
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
18
Views
8K
  • Advanced Physics Homework Help
Replies
2
Views
3K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
  • Introductory Physics Homework Help
Replies
21
Views
2K
Back
Top