mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
translated
This commit is contained in:
parent
847ae8cb25
commit
23e08a30e9
@ -1,101 +0,0 @@
|
||||
[#]: subject: "Math is fun with this Linux graphing calculator"
|
||||
[#]: via: "https://opensource.com/article/22/2/kalgebra-linux-calculator"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Math is fun with this Linux graphing calculator
|
||||
======
|
||||
Like your favorite graphing calculator from high school, KAlgebra is
|
||||
both a scientific calculator and a 2D plotter plus more features.
|
||||
![sin\(00.4x^2\) + .002y^2][1]
|
||||
|
||||
If you spent your high school years gazing at TI-80 series calculators but lost track of the device somewhere along the way, then you might sometimes yearn to relive those thrilling years of algebra and calculus. Somebody on the Linux KDE project must have felt that way, too, because one of the KDE Framework libraries, Analitza, provides syntax and widgets to enable you to perform advanced math functions with K apps like the graphing calculator KAlgebra.
|
||||
|
||||
### Install KAlgebra on Linux
|
||||
|
||||
On Linux, you can install KAlgebra from your software repository. For example, on Fedora, Mageia, and similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install kalgebra`
|
||||
```
|
||||
|
||||
On Elementary, Linux Mint, and other Debian-based distributions:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install kalgebra`
|
||||
```
|
||||
|
||||
Alternately, you can [install it as a flatpak][2].
|
||||
|
||||
### Linux calculator
|
||||
|
||||
KAlgebra is, like many of the famous graphing calculators used in schools, both a scientific calculator and a 2D plotter. Unlike any of the graphing calculators I've ever used, it's also a 3D plotter. But before rushing into 3D space, start with some basic syntax.
|
||||
|
||||
When representing an equation in KAlgebra, you must do some minor translation of math symbols as they're often written by hand to how they're represented on a computer. For instance, to convert Fahrenheit degrees to Celsius, the equation is: (5÷9) × (n-32), where _n_ is Fahrenheit. This is generally how equations and mathematical functions are expressed: they use special symbols like ÷ and × as well as variables like n, and then they identify what variable represents what kind of value. You may or may not know the meaning of every special math symbol, but as long as you know that a special symbol has a specific meaning, then you can look it up. In the temperature conversion example, the symbols are pretty common, so you probably already know that ÷ represents division and × represents multiplication.
|
||||
|
||||
In KAlgebra, as in most programming languages, division is represented by a forward slash and multiplication by an asterisk, so the equation to, for example, convert 70° Fahrenheit is `(5/9)*(70-32)`.
|
||||
|
||||
There are also special functions for common math operations in KAlgebra, and when you type any letter into KAlgebra, a tooltip provides potential auto-completion for available functions. Another way to write the equation for temperature conversion in KAlgerbra is to use the _times_ function: `times(5/9, 70-32)`.
|
||||
|
||||
As you complete math problems, established variables are listed in the right column of the calculator, including the `ans` value, which is updated with the answer to the completed equation. In theory, then, you should be able to reverse the conversion and derive a Fahrenheit temperature from _ans_.
|
||||
|
||||
![Temperature conversion in KAlgebra][3]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
### Graphing calculator
|
||||
|
||||
Numbers are fun, but they really get fun when they're used to draw shapes. The visualization of 2D space on a graph is an important skill to develop for all kinds of disciplines, not the least of which is computer programming.
|
||||
|
||||
To draw a line on a graph, you must set a horizontal value (the x-axis) or a vertical value (the y-axis) or both. A valid equation for a straight line in common mathematical notation is just `x=5`. This produces a straight horizontal line 5 points above the 0 origin point of the graph. However, in KAlgebra you must make it explicit that you want to set just the x value with the notation `x->5`.
|
||||
|
||||
![A line in KAlgebra][5]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
Other than that, graphing is as straightforward as it is elsewhere. You can write complex equations, and you can use special functions, like `sin`.
|
||||
|
||||
![Sin wave and an s-curve][6]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
### 3D graph on Linux
|
||||
|
||||
By the time you get to the 3D graph tab, you likely have a good understanding of the syntax of KAlgebra, and you've also exceeded my mathematical knowledge. I learned everything I know about cartesian graphs from electronics and synthesis, so the most fun I've had with the 3D graph is visualizing a sine wave as a 3D object:
|
||||
|
||||
![Sine waves in space][7]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
The difference between the 3D graph and the 2D graph (aside from 1 dimension) is that you can only have one plot in the 3D graph, so choose your equations wisely.
|
||||
|
||||
### Can math be fun?
|
||||
|
||||
It turns out that yes, math can be fun, and the answer is a good graphing calculator. As I've been working my way through math lessons to make up for some pretty dismal math grades in my past, I find myself wishing that calculators had been encouraged. I'm finding KAlgebra to be a very useful tool for not only solving arbitrary problems, but also for understanding the syntax of equations, and the purpose of functions. Whatever your relationship with mathematics, take out your KAlgebra calculator and run some numbers. It's actually really fun.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/kalgebra-linux-calculator
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/kalgebra-header.jpg?itok=BVm5kMq2 (sin(00.4x^2) + .002y^2)
|
||||
[2]: https://opensource.com/article/21/11/install-flatpak-linux
|
||||
[3]: https://opensource.com/sites/default/files/kalgebra-temperature_0.jpg (Temperature conversion in KAlgebra)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://opensource.com/sites/default/files/kalgebra-line-x.jpg (A line in KAlgebra)
|
||||
[6]: https://opensource.com/sites/default/files/kalgebra-sin.jpg (Sin wave and an s-curve)
|
||||
[7]: https://opensource.com/sites/default/files/kalgebra-sin-3d.jpg (Sine waves in space)
|
@ -0,0 +1,100 @@
|
||||
[#]: subject: "Math is fun with this Linux graphing calculator"
|
||||
[#]: via: "https://opensource.com/article/22/2/kalgebra-linux-calculator"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
这个 Linux 图形计算器让数学很有趣
|
||||
======
|
||||
就像你在高中时最喜欢的图形计算器一样,KAlgebra 同时是科学计算器还有 2D 绘图仪等功能。
|
||||
![sin\(00.4x^2\) + .002y^2][1]
|
||||
|
||||
如果你在高中时期一直盯着 TI-80 系列计算器,但后来忘记了该设备,那么你有时可能会渴望重温那些激动人心的代数和微积分岁月。 Linux KDE 项目中的某个人一定也有这种感觉,因为 KDE 框架库之一 Analitza 提供了语法和小部件,使你能够使用 K 系列应用(如图形计算器 KAlgebra)执行高级数学函数。
|
||||
|
||||
### 在 Linux 上安装 KAlgebra
|
||||
|
||||
在 Linux 上,你可以从软件仓库安装 KAlgebra。例如,在 Fedora、Mageia 和类似设备上:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install kalgebra`
|
||||
```
|
||||
|
||||
在 Elementary、Linux Mint 和其他基于 Debian 的发行版上:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install kalgebra`
|
||||
```
|
||||
|
||||
或者,你可以[将其安装为 flatpak][2]。
|
||||
|
||||
### Linux 计算器
|
||||
|
||||
KAlgebra 与学校中使用的许多著名图形计算器一样,既是科学计算器又是 2D 绘图仪。与我曾经使用过的任何图形计算器不同,它也是一个 3D 绘图仪。但在进入 3D 空间之前,先从一些基本语法开始。
|
||||
|
||||
在 KAlgebra 中表示方程时,你必须对数学符号进行一些小的翻译,因为它们通常是手写的,以了解它们在计算机上的表示方式。例如,要将华氏度转换为摄氏度,公式为:(5÷9) × (n-32),其中 _n_ 是华氏度。这通常是方程和数学函数的表达方式:它们使用 ÷ 和 × 之类的特殊符号以及 n 之类的变量,然后它们确定哪个变量代表什么样的值。你可能知道也可能不知道每个特殊数学符号的含义,但只要你知道特殊符号具有特定含义,那么你就可以查找它。在温度转换示例中,符号很常见,因此你可能已经知道 ÷ 表示除法,× 表示乘法。
|
||||
|
||||
在 KAlgebra 中,与大多数编程语言一样,除法由正斜杠表示,乘法由星号表示,因此转换 70 华氏度的等式为 `(5/9)*(70-32)`。
|
||||
|
||||
KAlgebra 中还有用于常见数学运算的特殊功能,当你在 KAlgebra 中输入任何字母时,工具提示会为可用功能提供潜在的自动补全功能。在 KAlgerbra 中编写温度转换方程的另一种方法是使用 _times_ 函数:`times(5/9, 70-32)`。
|
||||
|
||||
当你完成数学问题时,已确定的变量会列在计算器的右栏中,包括 `ans` 值,该值会根据已完成方程的答案进行更新。那么理论上,你应该能够反转转换并从 _ans_ 得出华氏温度。
|
||||
|
||||
![Temperature conversion in KAlgebra][3]
|
||||
|
||||
(Seth Kenlon,[CC BY-SA 4.0][4])
|
||||
|
||||
### 图形计算器
|
||||
|
||||
数字很有趣,但当它们被用来绘制形状时,它们才真正变得有趣。图形上二维空间的可视化是所有学科发展的一项重要技能,其中最重要的是计算机编程。
|
||||
|
||||
要在图形上画一条线,你必须设置一个水平值(x 轴)或一个垂直值(y 轴),或者两者都设置。在常见的数学符号中,一条有效的直线方程就是 `x=5`。这会在图形的 0 原点上方 5 点处生成一条水平直线。然而,在 KAlgebra 中,你必须明确表示你只想用符号 `x->5` 来设置 x 值。
|
||||
|
||||
![A line in KAlgebra][5]
|
||||
|
||||
(Seth Kenlon,[CC BY-SA 4.0][4])
|
||||
|
||||
除此之外,绘图与其他地方一样简单。你可以编写复杂的方程式,并且可以使用特殊函数,例如 `sin`。
|
||||
|
||||
![Sin wave and an s-curve][6]
|
||||
|
||||
(Seth Kenlon,[CC BY-SA 4.0][4])
|
||||
|
||||
### Linux 上的 3D 图
|
||||
|
||||
当你进入 3D 图形选项卡时,你可能已经很好地理解了 KAlgebra 的语法,并且你也超出了我的数学知识。我从电子学和合成中学到了关于笛卡尔图的所有知识,所以我对 3D 图最有趣的事情是将正弦波可视化为 3D 对象:
|
||||
|
||||
![Sine waves in space][7]
|
||||
|
||||
(Seth Kenlon,[CC BY-SA 4.0][4])
|
||||
|
||||
3D 图表和 2D 图表(除了一维)之间的区别在于 3D 图表中只能有一个图,因此请明智地选择方程式。
|
||||
|
||||
### 数学可以有趣吗?
|
||||
|
||||
事实证明,是的,数学可以很有趣,答案是一个很好的图形计算器。当我一直在通过数学课来弥补过去一些相当糟糕的数学成绩时,我发现自己希望鼓励使用计算器。我发现 KAlgebra 是一个非常有用的工具,不仅可以解决任意问题,还可以理解方程的语法,以及函数的目的。无论你与数学的关系如何,请拿出你的 KAlgebra 计算器,运行一些数字。这实际上是非常有趣的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/kalgebra-linux-calculator
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/kalgebra-header.jpg?itok=BVm5kMq2 (sin(00.4x^2) + .002y^2)
|
||||
[2]: https://opensource.com/article/21/11/install-flatpak-linux
|
||||
[3]: https://opensource.com/sites/default/files/kalgebra-temperature_0.jpg (Temperature conversion in KAlgebra)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://opensource.com/sites/default/files/kalgebra-line-x.jpg (A line in KAlgebra)
|
||||
[6]: https://opensource.com/sites/default/files/kalgebra-sin.jpg (Sin wave and an s-curve)
|
||||
[7]: https://opensource.com/sites/default/files/kalgebra-sin-3d.jpg (Sine waves in space)
|
Loading…
Reference in New Issue
Block a user