Return to Video

Telescope - Intro to Java Programming

  • 0:00 - 0:04
    Let's have a look at how to do this. In this case here we were asked to fill in
  • 0:04 - 0:10
    the ranges for x and y. Let's look at the picture, x moves this way starting at
  • 0:10 - 0:16
    0 and going up to the width minus 1. Y goes this way, also starting at 0 and
  • 0:16 - 0:22
    going up to the height minus 1. That gives this loop for x and this loop for y.
  • 0:22 - 0:26
    We were given a formula for the distance, and we can use that down here. Here
  • 0:26 - 0:33
    it is, simply using center x, center y and x, y for the two points. Now if the
  • 0:33 - 0:37
    distance is larger than the radius, then we should color the pixel black and
  • 0:37 - 0:39
    we're done.
Title:
Telescope - Intro to Java Programming
Description:

more » « less
Video Language:
English
Team:
Udacity
Project:
cs046: Intro to Programming
Duration:
0:40
Udacity Robot edited English subtitles for 13-42 Telescope
Udacity Robot edited English subtitles for 13-42 Telescope
Udacity Robot edited English subtitles for 13-42 Telescope
Darren Bridenbeck (Amara Staff) edited English subtitles for 13-42 Telescope
Cogi-Admin edited English subtitles for 13-42 Telescope
Cogi-Admin edited English subtitles for 13-42 Telescope
Cogi-Admin edited English subtitles for 13-42 Telescope

English subtitles

Revisions Compare revisions