How to graph a self-drawing line?

  • Context: Undergrad 
  • Thread starter Thread starter 3D_Mind
  • Start date Start date
  • Tags Tags
    Graph Line
Click For Summary
SUMMARY

The discussion centers on the concept of graphing a self-drawing line, specifically using the equation y=x with a parameter t to control the drawing and undrawing of line segments. The user proposes a method to visualize the line segment from (0, 0) to (r, r) by adjusting the parameter r, allowing for dynamic extension and contraction of the graph. The idea includes creating a graphics program that can handle multiple parameterized functions, enabling interactions such as collisions and reflections between lines as they evolve over time.

PREREQUISITES
  • Understanding of parametric equations, specifically x = t, y = t.
  • Basic knowledge of graphical programming concepts.
  • Familiarity with calculus, particularly in relation to limits and continuity.
  • Experience with Java applets or similar programming environments.
NEXT STEPS
  • Research how to implement parametric equations in a graphical programming environment.
  • Explore collision detection algorithms for graphical objects.
  • Learn about dynamic graphing libraries such as D3.js or p5.js.
  • Investigate methods for visualizing mathematical functions and their interactions over time.
USEFUL FOR

Mathematicians, computer graphics developers, educators, and anyone interested in dynamic visualizations of mathematical concepts and functions.

3D_Mind
Messages
2
Reaction score
0
Hello, this is my first post here so please be kind. I have had an idea of sorts ricocheting inside of my skull for the last two weeks and wanted to see if it had any merit or was dumb. Basically, my "idea" was what would happen if one could graph, say, y=x (for simplicity, where x>0) in a series of "steps".

For example, at, say, t=1, the line y=x would actually be a line segment from 0<x<1, then at t=2, it would "draw" out to now be a segment of y=x from 0<x<2, and so on. It could "jump" like this or draw with an arbitrary level of resolution (ie, in increments of 0.1, or 0.01 or whatever, instead of 1).

If I was to instead "turn the knob" backwards and reduce t, it would "un-draw". Basically, I could adjust t and have the graph extend or contract by some arbitrary but related amount. If this makes sense, how would I go about formally writing this out? I was thinking of using parametric equations but they don't quite behave how I want them too. Thoughts? Thanks!
 
Mathematics news on Phys.org
The parameteric equations, x = t, y = t, 0 <= t <= r, define a line segment from (0, 0), to (r, r). If you "turn the knob" by putting in a larger value of r, the line segment gets longer. If you dial it back by putting in a smaller value of r, you get a shorter line segment.

Conceivably you could have a simple graphics program with a user interface that would let you enter a value of r, and the program would draw the line. After it had drawn one line segment, you could enter a new value of r. If larger, the program would extend the line. If you entered a smaller value of r, the program could draw part of the line in the background color, thereby erasing or "undrawing" part of the line.

I did some Java applets that were a little like this about 15 years ago.
 
Ok, thanks! I kinda saw that as I was writing up my post. I guess that will do for now but I was kinda hoping for a way to write an expression or function or equation that does the same thing without needing to adjust the stated domain directly. I am not sure why I would want that though, maybe it does not matter.

The idea of a graphing program that would do this is actually something I would like to find (for free). What I ultimately want is to graph multiple parametrized functions in this way.

Then, I want to find a way, as simply as possible, of having the lines "collide" and/or "reflect" off of each-other. So by a few simple functions and some rule for the collision one could allow for complex behavior to evolve as r-->inf. Not only that, but as a consequence, a "record" of all of these events and behaviors would be "stored" via simply looking up any value of r to see a "frame" or snapshot of the graph at that "time". This would also allow for the idea of a particular line "getting there" before another. The lines could even reflect off of themselves as the graph gets more crowded. Basically, as the function segments get drawn out, they act like impenetrable barriers that reflect any incoming lines by some rule. I'm thinking Calculus would be needed to evolve r so that a line would not "jump" over another, in some conceivable cases, instead of colliding, due to insufficient "resolution". Or, maybe I should just do my math homework!
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 37 ·
2
Replies
37
Views
5K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
6K
Replies
1
Views
2K