• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Plotting a curve

 
Ranch Hand
Posts: 85
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been given an assignment to plot the curve of a parabola: The question goes thus; "Write a program to plot a curve y2 = 16x between y = 0 and y = +-30(The parabola lines should be represented with Letter D). The space between each alphabet is 15mm". Please guys the "y2" is y squared. I've been trying to figure to out how to do these but it's just looking too much. He also said we should include the plot of the curve. I don't know what to do and I'm counting on you all please i need some help. In-fact can java do this?
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What have you tried so far and where are you stuck?
Do you know how to solve this problem mathematically? Also what is "The space between each alphabet is 15mm"?
 
Shamsudeen Akanbi
Ranch Hand
Posts: 85
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean how do i start inputting the values of x in my program so that the dependent variable y gets squared, i don't want to pass it in a method.
 
Ranch Hand
Posts: 49
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Shamsudeen Akanbi wrote:I mean how do i start inputting the values of x in my program so that the dependent variable y gets squared, i don't want to pass it in a method.



Im not sure what exactly your question is. If you know what x is, you solve the equation for y and then calculate y.
Now you have both values and can plot 1 point, for each pair for x and y.
Java can do that for sure.

About the plotting: That is very unclear. Are you supposed to plot this as a textfile, where points of the parabol are represented by the character 'D'?


 
Shamsudeen Akanbi
Ranch Hand
Posts: 85
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, i know my 'y' i can represent the scale on the y-axis to be 1 cm to rep 1 unit, then i generate values for 'x'; with these, i then plot the graph and represent each points with a D instead of a dot(.).
 
Jon Avadis
Ranch Hand
Posts: 49
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, but what part do you have questions about?
It can definitively be done in java, i just did it for fun.

Heres the plot i got (it looks distorted because " " have less width than "D")

 
Shamsudeen Akanbi
Ranch Hand
Posts: 85
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you send m̶̲̥̅̊ε̲̣̣̣ the codes that solves it Bro
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No.
 
Jon Avadis
Ranch Hand
Posts: 49
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Shamsudeen Akanbi wrote:Can you send m̶̲̥̅̊ε̲̣̣̣ the codes that solves it Bro



As Rob verbosely pointed out: No.
But if you could explain where you have difficulties, i could give you a pointer.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic