← 수업 제작 도구
홈 › Components › Graph and Graphing Calc › 화면 3

화면 3. Graph.numberList [source]

원본: Computation Layer 문서(Graph) · Try It (원본 화면)

화면 번호3 / 29
문서 항목 설명 (원문)Gets the list of numbers that was assigned to the variable in the graph.

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 3 캡처

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1master CL
(화면 전체)
SCREEN
# Uses a subtitle sink to add some instruction for students below the title.
▷ subtitle sink로 제목 아래에 학생을 위한 안내를 추가한다.
subtitle: "Use the sketch tool to complete the drawing of this cat.\nThe grid and window adjustment are there to help you add detail."
▶ 화면 제목 아래에 표시할 부제목(subtitle)은 "Use the sketch tool to complete the drawing of this cat.\nThe grid and window adjustment are there to help you add detail."(스케치 도구를 사용해 이 고양이 그림을 완성하시오. 격자와 창 조절은 세부를 더 그려 넣도록 돕기 위해 있다.)로 한다.
글자 안의 \n은 줄바꿈이라서 두 줄로 표시된다.
2graphLeft그래프
# This uses a background sink to bring the sketch into the graph.
▷ background sink로 그림판의 그림을 그래프 안으로 가져온다.

background: layerStack(sketchLayer(sketch1.sketch),sketchLayer(sketch1.currentStroke))
▶ 그래프의 배경(background)은 그림판 sketch1에 그린 스케치(sketch1.sketch)와 지금 긋고 있는 선(sketch1.currentStroke)을 각각 레이어로 만들어 쌓은 것(layerStack(sketchLayer(sketch1.sketch),sketchLayer(sketch1.currentStroke)))으로 한다.
sketch1.sketch는 그림판 sketch1에 그린 스케치 전체, sketch1.currentStroke는 지금 긋고 있는 선을 가져온다. sketchLayer(…)는 스케치로 레이어를 만들고, layerStack(…)은 레이어 여러 개를 쌓아 하나의 레이어로 만든다. 그림판에 그린 그림과 긋는 중인 선이 이 그래프의 배경에 그대로 나타난다.
3sketch1그림판
# This code uses the numberList source from graph1
# to create a matching list in this sketch component.
# The list is used to control the spacing between gridlines.
▷ graph1의 numberList source를 사용해 이 그림판에 똑같은 배열(List)을 만든다. 이 배열은 격자선 사이의 간격을 조절하는 데 쓰인다.
numberList("L"): graphLeft.numberList("L")
▶ 그래프 배경의 숫자배열(numberList) "L"은 그래프 graphLeft의 숫자배열 "L"(graphLeft.numberList("L"))로 한다.
graphLeft.numberList("L")는 그래프 graphLeft의 숫자배열 "L"을 가져온다. 그림판에 그래프 배경이 있을 때 numberList는 그 그래프의 숫자배열을 정한다.
# Set the bounds of this sketch component using the variables # x_m, x_M, y_m, y_M in graph1. ▷ graph1의 변수 x_m, x_M, y_m, y_M으로 이 그림판의 경계를 정한다. bounds: makeBounds(graphLeft.number("x_m"), graphLeft.number("x_M"), graphLeft.number("y_m"), graphLeft.number("y_M")) ▶ 그림판의 경계(bounds)는 graphLeft의 변수 x_m, x_M, y_m, y_M의 값으로 만든 경계(makeBounds(graphLeft.number("x_m"), graphLeft.number("x_M"), graphLeft.number("y_m"), graphLeft.number("y_M")))로 한다.
makeBounds(왼쪽, 오른쪽, 아래, 위)는 경계 객체를 만든다. graphLeft.number("x_m")은 그래프 안의 변수 값을 읽어 온다. graphLeft의 이 변수 값이 바뀌면 그림판의 경계도 같이 바뀐다.