Vector Education [closed] - math

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Does anyone know where I could get a rundown of the vector math I'd need in order to program a raytracer? I could use a refresher of linear algebra and multivar calc since it's been a few years since I've taken those classes.

Good linear algebra books are terse at best, and would probably be overkill. A good 3D programming textbook might be more to the point. They'll have enough theory to get you through the math, and enough application to get you through the code.
There are plenty of free, online courses around. Some are specifically for 3D graphics programming. You might also take a look at NeHe's OpenGL tutorials.
If your brave, you could even look through the POV-Ray source.
Good luck.

Linear algebra is wonderful, and certainly appropriate here, but vectors in 3D space are a subset of general vector spaces.
I think something like Vector Math Tutorial for 3D Computer Graphics looks more appropriate.

i liked this book when i taught a computer graphics course: http://math.ucsd.edu/~sbuss/MathCG/
3D Computer Graphics:
A Mathematical Introduction with OpenGL
Author: Samuel R. Buss
This is the homepage for the book 3D Computer Graphics: A mathematical approach with OpenGL, by Sam Buss, Cambridge University Press, 2003. This book provides a mathematical introduction to 3D Computer Graphics at the advanced undergraduate or introductory graduate level.
* Table of contents: HTML or more complete contents as PDF. (Pagination has changed for the actual version.)
* Sample OpenGL programs
* Ray Trace software. Release 3 is now the standard version. NEW: Supports .NFF and .OBJ files. Uses kd-tree acceleration.
* Figures from the book. All figures in postscript and PDF formats.
* Errata page. List of known errata. Please email new errata to me at sbuss#ucsd.edu.

Related

Free software for mathematical modeling. Is R a good one? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for a free software for mathematical modeling.
Here is a list of things I might be willing to achieve with this software: Integrating functions, solving differential equations, graph theory, analyzing infinite series, local stability analysis, Taylor series, get eigenvectors, compute the long term behaviour of a system of equations, etc...
Here is a related SE post. I am surprised that nobody is suggesting R. I am currently a R user and already use R for graph theory. Therefore I would appreciate to use R also to make other mathematical modeling. Is R less efficient that Sage, SimPy, Mathematica and others for mathematical modeling? Why? Do you know a manual providing exaplanation for how to make mathematical modeling with R?
Thank you
Sounds like R is your first way to go. It does not make to good sense to compare R with any other tool in such a braod way you are asking for. R packages differ largely in efficiency, some are in fact C tools while others are written in the R language. As a start R can hardly be any wrong and is free.
Matlab might be a stable alternative, Julia is rising but still pre alpha.

Simple MCMC Bayesian Inference in R [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for a simple MCMC Bayesian network Inference function/package in R. Essentially, I just want a function that accepts the matrix containing my samples x my variables ( + optional parameters like burn-in and iteration counts) and returns the adjacency matrix of the inferred network.
I had been using the Matlab toolkit "BayesNet", which offers a simple 'learn_struct_mcmc' function which offers most of what I'm looking for. I'm looking for an equivalent in R.
I've been looking through the packages in http://cran.r-project.org/web/views/Bayesian.html, but haven't seen anything that quite does what I'm looking for. I wasn't trained as a statistician, and many of the packages I've looked at on that list either lack documentation or have more complicated statistics than I'm comfortable wiring together myself. I just need a simple function with "reasonable" defaults to get started.
Bonus points for something that leverages Rmpi or snow.
This gave me 132 possible relevant functions.
library(sos)
findFn("bayesian network")
How about this package.
http://cran.r-project.org/web/packages/MCMCpack/index.html
The closest thing to what I had in mind that I've found is the hc() function in the blearn package. They have a variety of other Bayesian network inference functions, as well, some of which can use snow.

Parallel arbitrary-precision arithmetic library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am trying to do modular exponentiation of integers with a very large modulus by repetitive squaring (the power is always a power of 2 in my case, so I believe this is the most efficient way). Thanks to a nice property of my modulus, computing remainder is cheap; the hard part is multiplication.
Currently I run GMP on Intel Core 2 Quad. I would like to make efficient use of the four cores of the processor, but GMP does not scale on SMP environments, so I am looking for a substitute arbitrary-precision arithmetic library. I have found some libraries for parallel computation on matrices, but what I really need is a library for integers.
Does what I am looking for exist?
The answer is yes, multi-threaded arbitrary-precision libraries do exist. But I'm not aware of a single one that is actually public. (with comparable speed to GMP)
For example, the arbitrary-precision libraries that are used in the Pi-computing programs, TachusPi and y-cruncher are capable of multi-threaded arithmetic on large numbers.
However, both libraries are closed source and are not available to the public for use.
Affiliation Disclosure: I'm the author of y-cruncher. So I have written one of such multi-threaded arbitrary-precision libraries myself.
Have you check out http://mpir.org? They claim to be doing this with a variant of GMP, and using GPUs.

Linear Algebra usage in programming [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am starting to learn Linear Algebra but it is has been very mathematical and I don't know its actual usage in programming. I heard it is a very useful subject for movements(animate) and graphics. I thought I could make my learning process for linear algebra more fun if I could learn it from its application through programming. That's learn through the practical way and not just working out on paper.
Since I am still learning the very basics of linear algebra, I am thinking where and how are basic concepts of linear algebra used in programming? What kind of interesting things could be done with basic knowledge of linear algebra such as row-echelon form, LU deposition, linear combination/system, etc. Any tutorials on any languages such as Java, Actionscript, PHP or others teaching the usage of basic linear algebra concepts to create interesting simple things?
Thanks!
Matrices and their transformations are used for positioning, rotating and scaling elements in Flash, IOS and Android. Check out transformation matrix wiki, android api, and a cool flash tutorial
As you've already stated, the most likely place that you'll find it is in graphics and games programming. You don't say what language you'd like to program in, so I'll assume Java:
http://www.java3d.org/
All techniques are not created equal. You will use LU decomposition and eigenvalues more if you're doing scientific computing.
This is a very good book. Don't be fooled by the date: the mathematics haven't changed. I'd also recommend looking at OpenGL.
All the simple graphice are made with the use of linear algebra...
Make a new console project nd try your skills...
Probably the most important application of linear algebra in programming is Modular Arithmetic.
As for the examples you've provided, the relationship is quite reversed. Programming is used to implement those algorithms, the algorithms are not used for general programming.

How to learn R as a programming language [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'd like to know how to learn the R language as as 'programming' language as opposed to learning it as a statistical system. My question is prompted by lack of understanding of such functions as parse, eval, etc. which may not find frequent use by an R user with a 'statistics' persuasion.
Edit: I've been exploring such tools like Rpy RSPerl rJava and wish to (at the very least) be able to understand concepts that facilitate R's communication with other programming languages.
The availability of Web applications for R (R-PHP, RApache, etc.) is another motivationg factor for me to gain a deeper, more structural understanding of R.
Last but not the least, I'd like to be able to write R packages for which such understanding would be beneficial if not necessary.
For starters, you might want to look at this article by John Cook. Also make sure that you read "The R Inferno".
There are many good resources on the R homepage, but in particular, read "An Introduction to R" and "The R Language Definition".
Some very closely related stackoverflow questions:
books-for-learning-the-r-language.
what-are-some-good-books-web-resources-and-projects-for-learning-r
suggestions-on-way-resources-to-start-learning-statistical-language-r
My favorite book on the subject: "Software for Data Analysis: Programming with R", by John Chambers, the creator of the S language.
(source: springer.com)
A good book for learning R-as-a-programming-language (as opposed to R-for-statistics) is The Art of R Programming, by Norman Matloff.
It's very readable, doesn't assume you're a computer scientist, and is quite inexpensive as R books go.
I would rather suggest a good and comprehensive start, like The R Book by Michael Crawley. It's an easy-to-read and complete book on R core functions, with statistical tips and a few exercises. It focuses a lot on R strengths (e.g. linear models) and gives also useful coding tricks. It helped me a lot while I was struggling on cryptic online courses.
I'm a very hands-on learner, so this advice may be specific to my learning style. I would suggest that the best place to start "learning to program" in any language involves finding problems outside of your normal range of experience and then trying to solve them using a programming language.
The projects that taught me the most about how to program with R had nothing to do with statistics at all.
Knowing functions like parse() and eval() is by no means a measure for being "a good R programmer". Applications that require heavy use of these functions do not make up a majority of the problem space in which you can apply R. Instead, I think you should try to be "a good programmer" who knows R. This involves refining your problem-solving approaches.
Programming is not a spectator sport-- a good book is indispensable as a reference on the tools available, but you need to find some problems upon which to hone your skills.

Resources