Joy of Greenfoot
文章平均质量分 87
qianer
这个作者很懒,什么都没留下…
展开
-
5.The Mean Streak: visualising the calculation of the mean.
This post is about visualising the calculation of the mean (aka the average).An average is a useful way of summarising a set of values into a single value. Averages allow us to quickly get a summary转载 2012-08-01 10:59:12 · 566 阅读 · 0 评论 -
14.像巴士一样行驶:在位置基础上添加摩擦力
14.Driving – Like A Bus: Adding friction based on location, and that differs sideways to forwards.This post is about adding friction, or: rotating, splitting and manipulating vectors.这篇帖子讨论添加摩擦力,或翻译 2012-08-01 11:05:44 · 839 阅读 · 0 评论 -
12.燃烧的橡胶:使用极坐标旋转位置
12.Burning Rubber: rotating positions using polar coordinatesThis post is about rotating coordinates by using polar coordinates.这篇帖子讨论使用极坐标进行坐标的旋转In our last post, we added a braking capabilit翻译 2012-08-01 11:04:34 · 2294 阅读 · 0 评论 -
11.巴士停不下来:使用固定或按比例方式实现减速
11.The Bus That Couldn’t Slow Down: implementing braking using fixed or proportional slow-downThis post is about two different ways of implementing braking.这篇帖子讨论两种实现减速的不同途径。In a recent post, we翻译 2012-08-01 11:04:00 · 1732 阅读 · 0 评论 -
9. 实现类似星球大战游戏风格的漂移
9.Catch My Drift: a post about implementing asteroids-style driftingThis post is about implementing drifting movement (a la asteroids), and draws together several previous posts.这篇帖子讨论如何实现飘移(以星球大战翻译 2012-08-01 11:02:40 · 1273 阅读 · 0 评论 -
6.通过加速度来实现跳跃和下落.
6.What Goes Up Must Come Down: implementation falling and jumping through acceleration.This post is about making things jump up and fall down (e.g. for platform games), or: modelling acceleration.翻译 2012-08-01 10:59:48 · 2472 阅读 · 1 评论 -
3. 使用反正切来围绕某个位置转向
3.They’ve got atan, You Want atan2: using inverse tangent to turn towards a locationThis post is about turning towards a point, or: more uses for trigonometry (sine, cosine, tangent, etc).这篇帖子讨论如何翻译 2012-08-01 10:55:02 · 1262 阅读 · 0 评论 -
36.飞行音乐
正弦函数不仅对处理三角形非常实用,它也可以被用于生成声音。翻译 2012-09-29 20:25:23 · 995 阅读 · 0 评论 -
34.像香蕉一样飞行的水果:抛掷运动
34.Fruit Flies Like A Banana: Projectile MotionSimple projectiles have been popular in games for a long time.Angry Birds recently combined it with collision physics to great success, but long ago, g翻译 2012-09-15 11:42:33 · 1860 阅读 · 0 评论 -
32. 更加有效地墙壁反弹
32. Bouncing Off The Walls, More ProductivelyIn a previous post we saw one way to bounce a ball off walls, by using angles and rotation. In maths, there are often several ways to approach a proble翻译 2012-09-01 19:54:20 · 1235 阅读 · 0 评论 -
23. 另一种砖块墙面:纹理映射
23.Another Brick In The Wall: Texture MappingIn our last post, we drew a 3D view of being in a maze-like grid of blocks. But all the walls were of single uniform colour, which is quite dull. The e翻译 2012-08-02 08:09:28 · 806 阅读 · 0 评论 -
19.绘制一条直线:在绘制直线时决定去填充哪些像素
19.Drawing in a Straight Line: Deciding which pixels to fill when drawing a lineOn paper, drawing a straight line between two points is easy: Put your ruler down on the page, and run your pencil acr翻译 2012-08-01 11:08:41 · 2727 阅读 · 0 评论 -
17. 首先我们获取曼哈顿距离:如何在一个网格里测量距离
17.First We Take Manhattan: How to measure distance on a gridWe saw very early on in this blog how to make an actor aim for a target location. One way to use this is for enemies chasing you in gam翻译 2012-08-01 11:07:47 · 2264 阅读 · 0 评论 -
4.使用模运算来实现世界的卷动
4.Teaching The World To Wrap: using modular arithmetric to make the world wrap aroundThis post is about wrapping coordinates so that when you go off one side of the world, you come back on the oppos翻译 2012-08-01 10:58:08 · 982 阅读 · 0 评论 -
21.视线:在网格中计算可见性
21.Lines of Sight: Calculating visibility on a gridLast post, we developed a game where your robotic opponents all come towards you and you must fire at them to stop them. It was made somewhat eas翻译 2012-08-02 08:00:21 · 913 阅读 · 0 评论 -
18.寻找你周围的道路:在设有障碍物的网格中寻路
18.Finding Your Way Around: Pathfinding on a grid with obstaclesIn the last post we saw about distances with horizontal and vertical movement, and how to move one object towards another using hori翻译 2012-08-01 11:08:15 · 2195 阅读 · 0 评论 -
10.敢问路在何方?:笛卡尔坐标和极坐标的转换
10.Where Am I Headed?: converting between cartesian and polar coordinatesThis post is about calculating your direction and overall speed from your X and Y speeds and restricting maximum speed, or: c翻译 2012-08-01 11:03:19 · 4286 阅读 · 1 评论 -
20.机器人逃犯:在网格中射击
20.Robotic Outlaws: Shooting on a gridRecently, we’ve seen how to find your way around a grid, and how to draw a line between two points, choosing which pixels to illuminate. Now we’ll move on to ga翻译 2012-08-01 11:09:26 · 1582 阅读 · 0 评论 -
22. 走进三维:光线投射法
22.Approaching the Third Dimension: RaycastingLet’s think for a moment about how to implement 3D graphics. One 3D graphics technique, ray-tracing, takes inspiration from the physical world. In the p翻译 2012-08-02 08:06:57 · 1520 阅读 · 0 评论 -
25. 射击石头:在点和圆之间进行碰撞检测
25.Shooting Rocks: Collision Detection between a point and a circleThe very first example on this blog looked at moving a spaceship around. In this post we’ll return to our spaceship, and get it s翻译 2012-08-02 08:17:15 · 1020 阅读 · 0 评论 -
13.理论知识:向量
13.Theory: VectorsThis post is a bit of theory about vectors, ready for more work onour bus scenario.这篇帖子介绍一点关于向量的理论,这是为进一步完善巴士游戏剧本做准备。A lot of the recent posts on this blog (e.g. on drifting, b翻译 2012-08-01 11:05:12 · 689 阅读 · 0 评论 -
15.理论知识:直线
15.Theory: LinesThis post is a bit of background on lines, which we’ll be using in the next post to finish offour bus scenario.这篇帖子是关于直线的一些背景知识,我们将在下篇帖子里用其来完成我们的巴士剧本。Mathematics typically only翻译 2012-08-01 11:06:23 · 797 阅读 · 0 评论 -
16.Checkpoint!: Adding checkpoints to the racing scenario by looking at the intersection of two line
In a recent post, we had a bus racing around a track. A nice finishing touch would be to add a facility to measure lap-times. But how can you measure when someone has completed a lap? The first step转载 2012-08-01 11:06:53 · 865 阅读 · 0 评论 -
7.Integrated Knowledge: changing acceleration to speed and speed to distance — an example of integra
This post is about acceleration, speed and distance, or: a little calculus.In our last post, we dealt with speed and acceleration. There is a strong relation between these two things, and distance:转载 2012-08-01 11:00:57 · 566 阅读 · 0 评论 -
24.Doomed: Trigonometry in an early first-person shooter game
Today’s trigonometry example comes from gaming history: the early days of what are now known as first-person shooters (FPS). But don’t worry, you don’t need to like or play FPS games to understand thi转载 2012-08-02 08:15:39 · 703 阅读 · 0 评论 -
31. Rack ‘Em Up
In recent posts, we’ve been building a pool game. One aspect of pool that we need to implement is positioning the balls for the start. There are fifteen balls to line up in a tightly packed triangle.转载 2012-08-27 08:51:30 · 774 阅读 · 0 评论 -
8.Looking Too Hard for Patterns: a post about finding spurious patterns
Today, March 14th, is Pi Day. In celebration, this post is related to the film Pi.Check out the retro style of his computerPi is the first film by Darren Aronofsky, who went on to make Requiem转载 2012-08-01 11:01:57 · 625 阅读 · 0 评论 -
29.桌球知识:两个圆之间的碰撞检测
29.Pooled KnowledgeIn this post we’re going to start work on a pool game. Pool is quite a nice example for a game, because really it’s a two-dimensional game. The balls are always (trick shots aside翻译 2012-08-02 08:38:55 · 1938 阅读 · 0 评论 -
1. 准备开张了
作者:nccb原帖地址:http://sinepost.wordpress.com 1. Ready to LaunchThis blog will primarily be about mathematics and computing: using computing to learn and apply mathematics. Both of these subjects翻译 2012-08-01 10:51:41 · 675 阅读 · 0 评论 -
37.第一季结束
I started the sinepost blog about eight months ago, and since then I’ve written around thirty-five posts — more than one a week. I’ve primarily focused on geometry (and a little mechanics), building g翻译 2012-09-29 20:44:54 · 669 阅读 · 0 评论 -
35.瞄准
35.Take AimIn our last post, we implemented projectile motion as the start of a game involving monkeys throwing bananas. We saw that projectile motion always follows the same parabolic pattern, wh翻译 2012-09-22 15:00:51 · 1069 阅读 · 0 评论 -
33. 实现桌球的反弹
33.Making Your Balls BounceIn this post, we will finally complete our pool game. We’ve already seenhow to detect collisions between balls: we just need to check if two circles are overlapping. We’翻译 2012-09-07 22:31:35 · 2114 阅读 · 0 评论 -
30.在墙壁间反弹
30.Bouncing Off The WallsIn this post we will continue building our pool game. One of the aspects of a pool game that we will need is the ability for the balls to bounce off the edges/cushions of翻译 2012-08-21 15:20:00 · 1531 阅读 · 0 评论 -
28. 图像旋转
28.Image RotationThis post is a quick diversion, on request from a user on the Greenfoot site. They asked how to rotate an image, which is actually quite a simple task, given what we have already翻译 2012-08-02 08:35:38 · 963 阅读 · 0 评论 -
27.直线上的第一个:只获取直线上第一个被碰撞的物体
27.First In Line: taking only the first item that a line collides with.In our last post we added a laser to our spaceship that shot asteroids. It was a very powerful laser, because it would shoot翻译 2012-08-02 08:32:37 · 562 阅读 · 0 评论 -
26.激光切割机:不放过任何目标;在直线和圆之间进行碰撞检测
26.Laser Cutter: Don’t Miss A Thing; collision detection between a line and a circleIn our last post, we saw how to do collision detection between bullets (modelled as an exact point) and asteroid翻译 2012-08-02 08:27:08 · 1061 阅读 · 0 评论 -
2. 使用正弦和余弦来朝着某个角度移动
2. Sine on the Dotted Line: using sine and cosine to move at an angleThis post is about moving at a given angle, or: what use are sine and cosine anyway?这篇帖子讨论如何根据给定的角度进行运动,即:sin和cos函数如何使用?Imagi翻译 2012-08-01 10:53:33 · 2404 阅读 · 0 评论