• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help! For my high school son  RSS feed

 
mike bulbar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all. I'm a dad asking for help for my son who is taking his forst computer science class in high school. He is learning Java code. His project is to write code that draws something. Without knowing any better, he chose to write code to draw Timmy from the Fairly Oddparents. I'm attaching a picture of Timmy. He's already stuck having just got the round eyes and the eyebrows figured out. The rest of Timmy seems to be irregular shapes. I think he's way over his head. Can anybody help him with Timmy? Or should I try to talk him into maybe Charlie Brown who is mostly circles I think.
Mike
timmy.jpg
[Thumbnail for timmy.jpg]
 
Piet Souris
Master Rancher
Posts: 2044
75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Mike,

I agree with you: this is a 'Mission Impossible' for a starter.
First of all your son must have some knowledge of Swing, to get any window
on the screen. Then you need to know about BufferedImages, Graphics2D,
Bezier curves, a good knowledge of maths, in short: unless your son is
a natural born talent, I think it will be hopeless.

But there is a simpler way for a beginner to get this figure on the screen.
You already have Timmy as a a jpg-image. So I would suggest:
let your son try to get a window on screen and then draw this jpg into it. That
is for a starter already quite some task!

Admittedly, this also requires some knowledge about Swing, but if he is willing
to take on such a project in the first place, then I assume he already had some of
it in his class.

Greetz,
Piet

PS: and, of course, your son has all the right in the world to prove me wrong!
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mike bulbar wrote:Hello all. I'm a dad asking for help for my son who is taking his first computer science class in high school. He is learning Java code. His project is to write code that draws something...

Hi mike, and welcome to JavaRanch.

I hate to say, but I'm having a bit of trouble getting to grips with that "write code that draws something" idea. I presume that means Java code; otherwise you wouldn't have come to a Java forum, but the spec is still very vague.

Draw what? Even if we're only talking about basic shapes like circles and rectangles, there are TONS; and looking at that drawing, I'd say that it involves curves, and some of those can be very complex.

It's possible that your son has already been given some start on this; but if not, I wouldn't start out with "Timmy". He looks very tough. I'm not sure I'd want to duplicate him, and I've been at this a long time (not that I'm any great shakes at graphics).

What about a snowman? Three increasing circles, one on top of the other (maybe overlapping) and an elongated triangle for a nose? I honestly don't know what level your son is at; but I suspect that may be more on the lines his teachers were thinking.

HIH

Winston
 
mike bulbar
Greenhorn
Posts: 3
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies guys. But I'm not sure what you mean by this:

But there is a simpler way for a beginner to get this figure on the screen.
You already have Timmy as a a jpg-image. So I would suggest:
let your son try to get a window on screen and then draw this jpg into it.


Yes, he's just starting and I think he bit off more than he can chew.
 
Piet Souris
Master Rancher
Posts: 2044
75
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I mean is: let your son write code that will open a window on screen, and code that next draws this jpg
into that window. This jpg is a file that you have, on disc probably, so he must write code that loads this file
into memory.

As I said: this already is quite some task for a beginner, not one that I would recommend.

Greetz,
Piet
 
mike bulbar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gotcha thanks
 
Tony Docherty
Bartender
Posts: 3271
82
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
What about a snowman? Three increasing circles, one on top of the other ...

Shouldn't that be "3 decreasing circles, one on top of the other"
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37469
539
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
As the others have said, Timmy looks really hard to draw. Given the initial assignment of "code that draws something" I don't think the teacher had cartoons in mind. I like the snowman idea above. That gives a base faster (three circles) and can be as simple or complex as you want (triangle carrot nose?).

Other things to draw can be easy. A christmas tree is triangles. A stick figure is mostly lines (and a circle). A TV is a a couple rectangles. You get the idea.

ps - we don't have an age requirement. Feel free to suggest your son register for an account and post questions here at coderanch when he gets stuck/wants extra help.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony Docherty wrote:Shouldn't that be "3 decreasing circles, one on top of the other"

Good point. Damn "top-down" thinking....

Winston
 
Campbell Ritchie
Marshal
Posts: 56545
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ever‑decreasing circles, surely
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!