7.8 线性函数-interactive
Section outline
-
Game Development
::博博开发Recall that a linear relationship is a relationship that traces a line when plotted. Linear relationships can be modeled using the slope- intercept form As increases, increases by a proportional amount.
::提醒注意线性关系是一种在绘制时跟踪线条的关系。 线性关系可以使用 y=mx+b 的斜度- 截面形式进行模拟。 随着 x 的增加, y 以比例数量增加 。Chris is a video game developer. He has developed a game with the functionality shown in the interactive below. Linear functions were used in many places in the game. Play the interactive and try to spot as many linear functions as you can.
::Chris 是一个电子游戏开发者。 他开发了一个游戏, 其功能显示在下面的互动中。 线性函数在游戏的许多地方都使用了。 玩此交互式函数, 并尝试尽可能多地定位线性函数 。
Running the Race
::赛跑赛跑A linear function is a linear relationship that obeys the rules of a function , and has a graph that forms a straight line. F unction notation is used to express a linear relationship when there are clearly defined inputs and outputs.
::线性函数是一种线性关系,它符合函数的规则,并有一个图形构成直线。当输入和输出有明确界定时,函数符号用于表示线性关系。Can a vertical line represent a linear function?
::垂直线代表线性函数吗?No, each input value cannot have more than one output value. A vertical line indicates that for a given input ( value), there is an infinite number of outputs ( values). It does seem a bit odd that a nearly vertical line is a function, but an exactly vertical line is basically the opposite of one!
::否, 每个输入值不能有一个以上的输出值。 垂直线表示, 对于给定输入( x- value) , 输出数量无限( y- values) 。 几乎垂直的线是一个函数, 但垂直线基本上是相反的, 似乎有点奇怪 !One linear function that you may have noticed is that the speed of the bird increases over time. The speed increases by a constant amount every five seconds. Recall that linear functions have a starting point , known as the intercept, and a constant rate of change , known as the . How do you know if a function is a linear function? You can determine this, using a graph, by looking to see if the points form a straight line. If the points on the graph form a straight line which is not vertical, the function is a linear function. If you have a table instead of a graph to look at, you should look at the rate of change. If the rate of the change in the input to the change in the output is the same for every point in the table, then the table represents a linear function.
::您可能注意到的一个线性函数是鸟的速度随时间而增加。 速度每5秒钟以恒定数量递增一次。 提醒注意线性函数有一个起点, 称为 Y 接口, 并有一个不变的修改率, 称为 y 。 您如何知道一个函数是否是一个线性函数 ? 您可以使用图表来确定这一点, 查看点是否构成一条直线线线。 如果图形上的点组成一条不垂直的直线, 则该函数为线性函数。 如果您有一个表格, 而不是图表, 您应该查看变化率 。 如果对输出变化输入的速率与表格中每个点相同, 那么表格代表线性函数 。Example
::示例示例示例示例The two graphs below represent possible speeds of the bird, over time in seconds, Which of the tables displays a linear relationship?
::下面的两个图表代表鸟的可能速度, f(x),随时间以秒计, x。哪个表格显示线性关系?Which table displays a linear relationship? To determine if a table expresses a linear relationship, j ust look at the rate of change throughout the entire table.
::为了确定表格是否表示线性关系,请查看整个表格的变动率。Consider the rates of change in each table In Table 1, the value does not increase or decrease by a constant amount for each increase of 1 unit in the value: it starts out increasing by 4, then goes to 8, then to 16, and so on.
::在表1中,Y值在X值每增加1个单位时不会增加或减少一个不变数额:它开始增加4个单位,然后增加到8个单位,然后到16个单位,等等。In T able 2, the value in creases consistently by 6 for each increase of 1 unit in the value.
::在表2中,x值每增加1个单位,Y值持续增加6个。Table 1 displays a non-linear function while T able 2 shows a linear function. In either case, t he greater the rate of change, the more the value will change for each increase in the value.
::表1显示的是非线性函数,表2显示的是线性函数。在任一情况下,变化率越高,x值每次增加的y值变化越多。Use the interactive below to change the rate at which the speed of the bird increases and explore how it affects the experience of the game.
::使用下面的交互效果来改变鸟儿速度加快的速度,并探索它如何影响游戏体验。Discussion Question
::讨论问题Which slider values do you feel will provide the user with the most enjoyable game experience? Why?
::您觉得哪个滑动值会为用户提供最愉快的游戏体验? 为什么?There are many situations that have a relationship that is not linear (as seen above in Table 1) . One example of this is an accelerating car. If the speed of the car is increasing over time, the graph of its distance over time will have an increasing slope , resulting in a graph that curves up.
::有许多情况的关系不是线性(如上文表1所示),其中一个例子是加速的汽车,如果汽车的速度随着时间的推移而加快,其距离的图形将越来越长,从而形成一个曲线上升的图表。Review the questions below to practice identifying different relationships as linear or nonlinear:
::审查下列问题,以便从实践中确定不同关系的线性或非线性关系:Discussion Question
::讨论问题Think of a real-world example for a nonlinear relationship. Explain how you know the relationship is not linear using a table and graph.
::想象一个非线性关系的真实世界示例。 请解释您如何使用表格和图解来理解这种关系不是线性关系 。
Telling Time
::提示时间Another linear function that you may have noticed is the function that controls the time bar (the blue slider). This function is defined as follows:
::您可能注意到的另一个线性函数是控制时间栏(蓝色滑块)的函数。此函数的定义如下:
:xx)=30-x
In this function, represents the number of seconds you reduce the time between accelerations ( the time between speed changes starts at 30 seconds), and represents the length of the time bar.
::在此函数中, x 表示加速度之间的时间间隔( 速度变化之间的时间从30秒开始),而 f( x) 表示时间栏的长度。Does the output value, y, change at the same rate based on the input value, x, throughout the table? Discussion Question
::讨论问题When is the time bar half full? How would you describe this in ?
::时空酒吧什么时候满半?
Keeping Score
::保持计分The final linear function from the game that Chris developed is used to determine the score. Many video games add points as time runs out or as actions are completed.
::Chris 开发的游戏的最后线性函数被用来确定分数。 许多电子游戏随着时间流逝或动作完成而添加点数。Example
::示例示例示例示例What is a linear function that could be used in the game above if the player earns 5 points every second? Assume the player starts with 0 points.
::如果玩家每秒挣5分, 上面的游戏中可以使用线性函数是什么? 假设玩家以 0 分开始, 那么线性函数是什么 。Since the number of points depend on the number of seconds, the number of seconds should be represented by and the number of points should be represented by Every second, you add 5 to the score.
::由于点数取决于秒数,秒数应以x表示,点数应以f(x)表示。每秒,分数中就会增加5。This table may help illustrate the situation.
::本表可能有助于说明情况。Points, f(x), over time in seconds (x) T he starting number is 0, which means that the intercept is 0. The rate of increase is 5 points per second which means that the slope is 5.
::起始数是 0,这意味着 Y 界面是 0。 增长率是每秒5 点, 这意味着斜坡是 5 点 。This is a very similar linear function to the one that described the Time Bar:
::这是一个非常相似的线性函数,与描述时间栏的函数( f(x)=30-x)非常相似。Discussion Questions
::讨论问题 讨论问题-
Discuss with a partner or in groups, how will the game know when this function should end? What information does the programmer need to include so that the game will know to stop the function?.
::与伙伴或分组讨论, 游戏如何知道此函数何时结束 ? 程序员需要包含什么信息才能让游戏知道停止此函数 ? -
Discuss with a partner or in groups,
w
hat is the function used in the game?
::与伙伴或分组讨论游戏中使用的函数是什么? -
Discuss with a partner or in groups, w
hat changes could you make to the scoring system? How would they affect the game?
::如何改变评分系统?它们会如何影响游戏?
Social Media Followers
::社交媒体追随者Two friends, Manuel and Lucas, recently set up new social media accounts. Manuel says that he has 300 followers and that he gets about 6 new followers a week. Lucas wants to know how many followers he gets per week so he tracks his numbers of followers in a table.
::有两个朋友,曼努埃尔和卢卡斯,最近建立了新的社交媒体账户。 曼努埃尔说,他有300名追随者,每周有6名新的追随者。 卢卡斯想知道他每周有多少追随者,因此在一张桌子上追踪他的追随者人数。Weeks 0 1 2 3 Number of people following Lucas 200 207 214 221 Summary -
Linear functions are in the form
::线性函数在 f(x) = mx+b 表中。 -
To identify a linear function from a table, find the rate of change between each of the y-values, if they are the same the function is linear.
::要从表格中确定线性函数,请查找每个y值之间的变化率,如果y值相同,则查找线性函数的变动率。
-
Discuss with a partner or in groups, how will the game know when this function should end? What information does the programmer need to include so that the game will know to stop the function?.