How to graph a self-drawing line?

  • Context: Undergrad 
  • Thread starter Thread starter 3D_Mind
  • Start date Start date
  • Tags Tags
    Graph Line
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 3K views
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!