Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

quat(3alleg4) [opendarwin man page]

QUAT(3alleg4)							  Allegro manual						     QUAT(3alleg4)

NAME
QUAT - Stores quaternion information. Allegro game programming library. SYNOPSIS
#include <allegro.h> typedef struct QUAT DESCRIPTION
float w, x, y, z; Read chapter "Quaternion math routines" for a description on how to obtain/use this structure. SEE ALSO
, exquat(3alleg4) Allegro version 4.4.2 QUAT(3alleg4)

Check Out this Related Man Page

exquat(3alleg4) 						  Allegro manual						   exquat(3alleg4)

NAME
exquat - A comparison between Euler angles and quaternions. Allegro game programming library. SYNOPSIS
#include <allegro.h> Example exquat DESCRIPTION
Euler angles are convenient for storing and creating 3D orientations. However, this program demonstrates that they are not good when interpolating between two different orientations. The problem is solved by using Allegro's quaternion operations. In this program, two cubes are rotated between random orientations. Notice that although they have the same beginning and ending orienta- tions, they do not follow the same path between orientations. One cube is being rotated by directly incrementing or decrementing the Euler angles from the starting point to the ending point. This is an intuitive notion, but it is incorrect because it does not cause the object to turn around a single unchanging axis of rotation. The axis of rotation wobbles resulting in the object spinning in strange ways. The object will eventually end up in the orientation that the user intended, but it gets there in a way that is unattractive. Imagine if this method was used to update the position of a camera in a game! Sometimes it would swing wildly and disorient the player. The other cube is animated using quaternions. This results in a much more pleasing animation because the cube turns around a single axis of rotation. SEE ALSO
BITMAP(3alleg4), END_OF_MAIN(3alleg4), MATRIX_f(3alleg4), QUAT(3alleg4), acquire_bitmap(3alleg4), allegro_error(3alleg4), alle- gro_init(3alleg4), allegro_message(3alleg4), apply_matrix_f(3alleg4), blit(3alleg4), circle(3alleg4), clear_keybuf(3alleg4), clear_to_color(3alleg4), create_bitmap(3alleg4), desktop_palette(3alleg4), destroy_bitmap(3alleg4), font(3alleg4), get_cam- era_matrix_f(3alleg4), get_rotation_matrix(3alleg4), get_rotation_matrix_f(3alleg4), get_rotation_quat(3alleg4), install_keyboard(3alleg4), keypressed(3alleg4), line(3alleg4), matrix_mul_f(3alleg4), palette_color(3alleg4), persp_project_f(3alleg4), quat_interpolate(3alleg4), quat_to_matrix(3alleg4), readkey(3alleg4), release_bitmap(3alleg4), rest(3alleg4), screen(3alleg4), set_gfx_mode(3alleg4), set_pal- ette(3alleg4), set_projection_viewport(3alleg4), textout_ex(3alleg4) Allegro version 4.4.2 exquat(3alleg4)
Man Page

11 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

equation calculation on Unix

Hay, guys, Any ideas how to calculate like this: in first file, there're number of lines listing 2+3, 6*9 ....... Then, how to get the result and put them in another file in format: 2+3 5 6*9 54 ...... sheerly by shell command, no scripts required. (4 Replies)
Discussion started by: robbinGlasses
4 Replies

2. UNIX for Dummies Questions & Answers

Can you perform mathematical equations in UNIX?

Hello one and all, I have a basic background in UNIX, but I was wondering if there is a way to perform simple mathematical equations (like multiplication, addition)? If so, is there a way to multiply values from a column by a value to produce a column with the answers? :confused: I am... (4 Replies)
Discussion started by: VioletFairy
4 Replies

3. Shell Programming and Scripting

AWK equation evaluation.

Hi, Is there a way to evaluate an equation contained in a string within an AWK script? For example: A = "(5*2)-1" (this equation is read from a file and varies line by line) In this example, I can't see any way to get an answer of 9 unless I do: cmd = "awk 'BEGIN{print "A"}'" cmd |... (3 Replies)
Discussion started by: srdgeo
3 Replies

4. Shell Programming and Scripting

Perl - maths equation - need help

if input to the perl program is ' ( p * ((a+b) * (c+d))) + q ' it shuld give the output as ' pac + pad + pbc + pbd + q ' .can anyone suggest a way to do this ? (7 Replies)
Discussion started by: Anuj8584
7 Replies

5. High Performance Computing

Differential Equations

I`m having a cluster with Rocks 5.2 distribution and I want to solve differential equations and I`m interested to know if are some programs already developed to do this. (3 Replies)
Discussion started by: rapo
3 Replies

6. High Performance Computing

Performance Equation

I'm running a MPI program using a cluster of 4 machines(different machines of different processing power,cpu utilization etc.). I'm trying to balance the computation among the machine to get the minimum execution time for that. I tried to balance it by creating a threshold value by taking the load... (1 Reply)
Discussion started by: chamila1986
1 Replies

7. UNIX for Dummies Questions & Answers

Awk - Two equations?

I really know barely anything about awk and the like but I have a bit of code I need help with. The bash script is meant to get my usage numbers from my ISP and it does so perfectly. However I want to know how much I can use each day. So to do this I would need to divide its output by the number... (5 Replies)
Discussion started by: Light_
5 Replies

8. Shell Programming and Scripting

awk if one liner syntax for equating with a string variable

I would like to have help with syntax for using a string varaibles inside if and else in a awk one liner. Eg. I would like to say, list all the filenames that have been modified in a particular month(present in a string variable) or list all the filenames whose owner is $owns and owner group is... (3 Replies)
Discussion started by: Prev
3 Replies

9. Shell Programming and Scripting

Try solver System of linear algebraic equations in Shell Bash

I want to try solving system of linear algebraic equations in Shell bash but i have any problems Value input is matrix and I dont know how to input matrix in Shell because that is dont support 2-dimensional array Please help me. Thank you so much (3 Replies)
Discussion started by: newbieseos
3 Replies

10. Shell Programming and Scripting

Help with insert a value equation in bash script

HI All, I have a script in bash that i want that script will perform action When the size of a particular folder exceeds the 80%. Here is an example of script that result is exactly 80% : #!/bin/bash CHECK=$(df -h /var/log/syslog | grep '80%' | xargs echo | cut -d' ' -f5) if ];... (1 Reply)
Discussion started by: Aviel.shani
1 Replies

11. Homework & Coursework Questions

Solving heat equation using crank-nicolsan scheme in FORTRAN

! The one-dimensional PDE for heat diffusion equation ! u_t=(D(u)u_x)_x + s where u(x,t) is the temperature, ! D(u) is the diffusivity and s(x,t) is a source term. ! Taking D(u)= 1 and s(x,t)=0 gives ! u_t= u_xx ! uniform one dimensional region |x|<1 for t>0 ! uniform mesh size delta x=0.1 !... (1 Reply)
Discussion started by: watto1
1 Replies