text:
PCL/OpenNI tutorial 1: Installing and testing
Go to root: PhD-3D-Object-Tracking
This series of tutorials will explain the usage of a depth camera like Kinect for "serious" researching purposes. As you may know, Kinect is in fact an affordable depth sensor, developed with technology from PrimeSense, based on infrarred structured light method. It also has a common camera (which makes it a RGB-D device), a microphone and a motorized pivot. Its use is not limited to playing with a Xbox360 console, you can plug it to a computer and use it like any other sensor. Many open-source drivers and frameworks are available.
Since its release on November 2010, it has gained a lot of popularity, specially among the scientific community. Many researches have procured themselves one because, despite the low cost (about 100 $), it has proven to be a powerful solution for depth sensing projects. Current investigations focus on real-time surface mapping, object recognition and tracking, and localization. Impressive results (like the KinectFusion project from Microsoft) are already possible.
The new Xbox One ships with an upgraded version, Kinect v2, with enhanced resolution, that is able to detect your facial expression, measure your heart rate, and track every one of your fingers. A PC development-ready version (Kinect for Windows v2) was released in July 2014, but it could only be used with the official Windows SDK (open source support exists but is still young). In October 2014 an adapter that allows to plug the standard Kinect v2 to a PC was released, so the development version of the sensor was discontinued in April 2015. Now you can just buy the standard one for the console plus the adapter.
I will explain the installation and usage of one of the "legacy" Kinect 1.0 devices with a common PC, and the possibilities it offers. I will do it in an easy to understand way, intended for students that have just acquired it and want to start from scratch.
Keep in mind that the software that we are going to use (Point Cloud Library and OpenNI drivers) will also let you use any other device like the Xtion PRO or Xtion PRO LIVE from ASUS (the PRO only has a depth sensor, the PRO LIVE is a RGB-D camera) without changing a line of code.
NOTE: The tutorials are written for Linux platforms. Also, 64-bit versions seem to work better than 32-bit.
- 1 Requirements
- 2 Connecting everything
- 3 Installing the software
- 4 Testing (OpenNI viewer)
- 5 Conclusion
You will need the following:
- A common Kinect device, out of the box. You can buy it in your local electronics shop, or online. It also includes a free copy of Kinect Adventures!, which is useless if you do not own the console. Microsoft has released a Kinect for Windows device, which is a normal looking Kinect no longer compatible with Xbox360, that will only work with their official SDK, intended for developers only. Also, like I stated earlier, you can use an ASUS Xtion indistinctly.
- A computer running Linux (Debian or Ubuntu preferably).
- A medium-sized room. Kinect has some limitations for depth measurement: 40cm minimum, 8m maximum (make it 6).
NOTE: Kinect for Windows may have problems working with open source drivers on Linux .
Connecting everything
Kinect does not work with a common USB port. Its power consumption is a bit higher because of the motor, so Microsoft came up with a connector that combines USB and power supply. Old Xbox 360 models needed a special adapter, new S model ones already have this new port. Luckily, Kinect comes with the official adapter out of the box (otherwise you will have to buy one).
Just plug the adapter to any power socket, and the USB to your computer. Let's check typing this in a terminal:
Output should list the following devices:
Bus 001 Device 005: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 006: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 007: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
If you are using a Xtion, you should see:
Bus 001 Device 004: ID 1d27:0601 ASUS
"0601" identifies the new Xtion model, "0600" the older one. Both should work the same. But try to avoid USB 3.0 ports!
Installing the software
There is more than one way to get your Kinect working on your PC, and start developing applications for it:
- Kinect for Windows SDK and Developer Toolkit: released on June 16, 2011 as a non-commercial SDK intended for application development. Version 1.8, the last there will ever be now that Kinect v2 is out, was released on September 2013. Because it comes from Microsoft, it is obviously the easiest way to get everything working. Sadly, there is no Linux version.
- libfreenect library: from the OpenKinect project, it is intended to be a free and open source alternative to the official drivers. libfreenect is used by projects like ofxKinect, an addon for the openFrameworks toolkit (and as of version 0.8, included in the core package) that runs on Linux and OS X. ofxKinect packs a nice example application to show the RGB and point cloud taken from Kinect.
- PrimeSense drivers: they were released as open source after the the OpenNI project was created, along with the motion tracking middleware, NITE, and the SDK. NI stands for Natural Interaction, and the project tried to enforce a common standard for human input using Kinect-like sensors. These official drivers are used by ROS (the Robot Operating System, a massive collection of libraries and tools for robotic researchers) and PCL (the Point Cloud Library, with everything needed for 3D point cloud processing). Sadly, version 2.0 of the OpenNI SDK dropped support for Kinect on Linux due to licensing issues, so for now PCL relies on legacy 1.x versions. Also, Apple bought PrimeSense on November 2013, and on April 2014 OpenNI's webpage was closed. The source is now being maintained by a third party.
- SensorKinect: a modified version of the official PrimeSense drivers, used for example by ofxOpenNI (another openFrameworks addon). Last updated on 2012.
For this tutorial, we are going to use PCL with the OpenNI drivers, so owners of a Xtion can also get it to work.
Precompiled PCL for Ubuntu
If you have a valid installation of ROS (through their repository), you do not have to install anything. Both OpenNI and PrimeSense drivers, as well as PCL, should be already installed. You can check it with:
sudo apt-get install libpcl-1.7-all libpcl-1.7-all-dev libopenni-dev libopenni-sensor-primesense-dev
The previous command should state that all packages are already installed (change the PCL version number as needed), install them if not. If you get an error about overwriting some file, check this.
In case you do not want ROS, there is a PPA (Personal Package Archive, a private repository) which has everything we need. Add it to your sources, and install everything:
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install build-essential cmake libpcl1.7 libpcl-dev pcl-tools
Trying to mix ROS and PCL repositories and packages can cause some errors, so choose one of them and stick with it. Check the PCL/OpenNI troubleshooting page because your Kinect may not work by default in 32 bits.
Compiling PCL from source
For Linuxes without a precompiled version of PCL, you will need to compile it yourself. This has an advantage, actually: you can customize the build options and choose what you want. Also, the resulting binaries and libraries should be a bit faster. And you always get the latest version! The instructions are here, but the steps are easy so I will show them to you.
Installing the dependencies
Some of PCL dependencies can be installed via the package manager. Others will require additional work.
sudo apt-get install build-essential cmake cmake-curses-gui libboost-all-dev libeigen3-dev libflann-dev libvtk5-dev libvtk5-qt4-dev libglew-dev libxmu-dev libsuitesparse-dev libqhull-dev libpcap-dev libxmu-dev libxi-dev libgtest-dev libqt4-opengl-dev
The trunk (1.8) version of PCL adds support for VTK 6 and Qt 5, so if you want to use them, you must install the following packages (say yes if you are asked to remove VTK 5 and Qt 4 packages):
sudo apt-get install libvtk6-dev libqt5opengl5-dev
PCL will not build if you mix them, e.g., using VTK 5 with Qt 5 will give you an error halfway through the compilation.
OpenNI requires Sun's official JDK (Java Development Kit), which is no longer available on official apt repositories. You can use unofficial ones, or do it manually. For the last method, go to the Java SE downloads page (SE means Standard Edition) and download the latest version (e.g., jdk-8u66-linux-x64.tar.gz). Extract it, then move the contents to /usr/lib/jvm/ so it is available system-wide:
sudo mkdir -p /usr/lib/jvm/
sudo cp -r jdk1.8.0_66/ /usr/lib/jvm/
Then, make it the default choice to compile and run Java programs. Remember to change the version number as needed!
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_66/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_66/bin/javac" 1
sudo update-alternatives --install "/usr/bin/jar" "jar" "/usr/lib/jvm/jdk1.8.0_66/bin/jar" 1
To be sure, use the following commands to manually select the correct option, in case there is more than one choice:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config jar
If you are still not sure, run them and display the version, making sure it is the one you installed:
java -version
javac -version
Sun's JDK is now installed.
PCL uses OpenNI and the PrimeSense drivers to get data from devices like Kinect or Xtion. It is optional, but it would not make much sense not to install it, would it? If you are using Ubuntu, add the PPA and install libopenni-dev and libopenni-sensor-primesense-dev, which should be done already. Otherwise, fetch the OpenNI and PrimeSense Sensor sources from GitHub (download them as .zip, the link is on the right). Extract them, and install the dependencies:
sudo apt-get install python libusb-1.0-0-dev freeglut3-dev doxygen graphviz
Go to the directory where you extracted OpenNI (OpenNI-master/ for me), and open a terminal in the Platform/Linux/CreateRedist/ subdirectory. Issue:
When it finishes, and if there are no errors (check the PCL/OpenNI troubleshooting page if you get any), go to Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-x64-v22.214.171.124/ (or your equivalent), and install (you must be root):
sudo ./install.sh
Now, go to the directory where you extracted the PrimeSense drivers (Sensor-master/ for me), and repeat the exact same procedure (go to Platform/Linux/CreateRedist/, issue ./RedistMaker, go to Platform/Linux/Redist/Sensor-Bin-Linux-x64-v188.8.131.52/, issue sudo ./install.sh). Congratulations, you have now installed OpenNI.
Like OpenNI, nVidia CUDA is an optional dependency, that will allow PCL to use your GPU (Graphics Processing Unit, that is, your graphics card) for certain computations. This is mandatory for tools like KinFu (do not bother unless you have at least a series 400 card with 1.5 GB of VRAM).
Some distributions provide packages for CUDA in the repositories. For example, in Ubuntu:
sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit
If you want to install it manually (which is incompatible with the previous method), go to the CUDA downloads page, which is self-explanatory, and get the small .deb file or the huge .run toolkit/SDK installer file for your system (you should have installed the nVidia drivers already, but the installer will also do it for you if needed).
If you chose the .deb file, install it using the method of your choice, like Gdebi package manager, or through console:
sudo dpkg -i <package.deb>
The .deb does not contain all CUDA stuff, it just adds their repository to your software lists. Now you must install everything:
sudo apt-get update
sudo apt-get install cuda
If, on the other hand, you downloaded the .run, give it execution permissions:
chmod +x cuda_7.0.28_linux.run
And install it. You can use the default options, although if you have a working nVidia graphics driver for your card, you may want to say "no" when the installer offers to install it for you:
sudo ./cuda_7.0.28_linux.run
The environment variables need to be changed so your system can find CUDA's libraries and binaries. Open /etc/ld.so.conf:
sudo nano /etc/ld.so.conf
And append one of these two lines:
/usr/local/cuda/lib64 # Add this on 64-bit only.
/usr/local/cuda/lib # Add this on 32-bit only.
Save with Ctrl+O and Enter, exit with Ctrl+X. Reload the cache of the dynamic linker with:
sudo ldconfig
Now, append CUDA's bin directory to your PATH. Do this by editing your local .bashrc file:
nano ~/.bashrc
And append this line:
export PATH=$PATH:/usr/local/cuda/bin
CUDA is now installed.
Getting the source
Every dependency is installed. Time to download PCL's source code. First, you must choose whether to install the stable or the experimental branch of PCL. The stable branch is the latest official release and it is guaranteed to work without problems. The experimental branch may give you a compiling error seldomly, but you can find some interesting features that stable users will have to wait some months for. Apart from that, both are built the same way.
To get the stable version, go to the downloads page, get pcl-pcl-1.7.2.tar.gz or whatever the latest release is, and extract it somewhere. For the experimental version, use Git:
sudo apt-get install git
git clone https://github.com/PointCloudLibrary/pcl PCL-trunk-Source
The compiled trunk version of PCL will take up more than 8 GB. So make sure you put the source folder in a partition with enough free space!
Go the the PCL source directory (pcl-pcl-1.7.2/ or PCL-trunk-Source/), and create a new subdirectory to keep the build files in:
mkdir build
cd build
Now it is time to configure the project using CMake. We will tell it to build in Release (fully optimized, no debug capabilities) mode now, and customize the rest of the options later:
cmake -DCMAKE_BUILD_TYPE=Release ..
CMake should be able to find every dependency, thus being able to build every subsystem except for the ones marked as "Disabled by default". If you are happy, you can build now, otherwise let's invoke CMake's curses interface to change a couple of things (mind the final dot):
ccmake .
Here you can change the build options. The program usage can be found at the bottom of the screen. Try turning all functionality "ON". The most important thing, in case you want to use CUDA, is to enable it and give CMake the path to your SDK. Go to the "CUDA_SDK_ROOT_DIR" option and enter the correct path (probably /usr/local/cuda/ or similar).
When you are done, press C to configure and G to generate and exit the tool. Sometimes, the options you change can activate previously omitted parameters, or prompt some warning text. Just press E when you are finished reading the message, and keep pressing C until it lets you generate (new parameters will be marked with an asterisk, so you can check them and decide whether or not you want further customization).
If you are done configuring, it is time to build:
NOTE: Additionally, you can append the parameter -jX to speed up the compilation, X being the number of cores or processors of your PC, plus one.
Remember that, at any time, you can manually force the project to be reconfigured and built from scratch by emptying the build/ directory with:
rm -rf ./*
It will take some time to compile PCL (up to a few hours if your PC is not powerful enough). When it is finished, install it system-wide with:
sudo make install
And you should reboot and proceed to the next section, to see if your computer now recognizes (and uses) your Kinect device.
Testing (OpenNI viewer)
We are going to write a simple example program that will fetch data from the Kinect or Xtion and present it to the user, using the PCL library. It will also allow to save the current frame (as point cloud) to disk. If you feel lazy, you can download it here, and skip the next two sections. Otherwise, create a new directory anywhere in your hard disk and proceed.
Inside that directory, create a new text file named CMakeLists.txt. PCL-based programs use the CMake build system, too. Open it with any editor and paste the following content:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
find_package(PCL 1.7 REQUIRED)
set(PCL_BUILD_TYPE Release)
file(GLOB PCL_openni_viewer_SRC
add_executable(openniViewer ${PCL_openni_viewer_SRC})
target_link_libraries (openniViewer ${PCL_LIBRARIES})
CMake syntax is quite self-explanatory. We ask for a CMake version 2.8 installation, minimum. We declare a new project named "openni_PCL_viewer". We tell CMake to check for the presence of PCL library development files, version 1.7. If our system can not meet the CMake and PCL version requirement, the process will fail.
Next, we feed the compiler and linker the directories where PCL includes and libraries can be found, and the defined symbols. We tell CMake to use the "Release" build type, which will activate certain optimizations depending on the compiler we use. Other build types are available, like "Debug", "MinSizeRel", and "RelWithDebInfo".
Finally, we create a variable, "opennipclviewer_SRC", that will store a list of files to be compiled (though we will only have one). We create a new binary to be compiled from these source files, and we link it with the PCL library.
Check the CMake help for more interesting options.
We told CMake it could find the source files in a src/ subdirectory, so let's keep to out word and create it. Then, add a new main.cpp file inside and paste the following lines:
// Original code by Geoffrey Biggs, taken from the PCL tutorial in
// http://pointclouds.org/documentation/tutorials/pcl_visualizer.php
// Simple OpenNI viewer that also allows to write the current scene to a .pcd
// when pressing SPACE.
#include <pcl/io/openni_grabber.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/console/parse.h>
#include <iostream>
using namespace std;
using namespace pcl;
PointCloud<PointXYZRGBA>::Ptr cloudptr(new PointCloud<PointXYZRGBA>); // A cloud that will store color info.
PointCloud<PointXYZ>::Ptr fallbackCloud(new PointCloud<PointXYZ>); // A fallback cloud with just depth data.
boost::shared_ptr<visualization::CloudViewer> viewer; // Point cloud viewer object.
Grabber* openniGrabber; // OpenNI grabber that takes data from the device.
unsigned int filesSaved = 0; // For the numbering of the clouds saved to disk.
bool saveCloud(false), noColor(false); // Program control.
printUsage(const char* programName)
cout << "Usage: " << programName << " [options]"
<< endl
<< endl
<< "Options:\n"
<< endl
<< "\t<none> start capturing from an OpenNI device.\n"
<< "\t-v FILE visualize the given .pcd file.\n"
<< "\t-h shows this help.\n";
// This function is called every time the device has new data.
grabberCallback(const PointCloud<PointXYZRGBA>::ConstPtr& cloud)
if (! viewer->wasStopped())
if (saveCloud)
stringstream stream;
stream << "inputCloud" << filesSaved << ".pcd";
string filename = stream.str();
if (io::savePCDFile(filename, *cloud, true) == 0)
cout << "Saved " << filename << "." << endl;
else PCL_ERROR("Problem saving %s.\n", filename.c_str());
saveCloud = false;
// For detecting when SPACE is pressed.
keyboardEventOccurred(const visualization::KeyboardEvent& event,
void* nothing)
if (event.getKeySym() == "space" && event.keyDown())
saveCloud = true;
// Creates, initializes and returns a new viewer.
boost::shared_ptr<visualization::CloudViewer> v
(new visualization::CloudViewer("OpenNI viewer"));
return (v);
main(int argc, char** argv)
if (console::find_argument(argc, argv, "-h") >= 0)
return -1;
bool justVisualize(false);
string filename;
if (console::find_argument(argc, argv, "-v") >= 0)
if (argc != 3)
return -1;
filename = argv[2];
justVisualize = true;
else if (argc != 1)
return -1;
// First mode, open and show a cloud from disk.
if (justVisualize)
// Try with color information...
io::loadPCDFile<PointXYZRGBA>(filename.c_str(), *cloudptr);
catch (PCLException e1)
// ...and if it fails, fall back to just depth.
io::loadPCDFile<PointXYZ>(filename.c_str(), *fallbackCloud);
catch (PCLException e2)
return -1;
noColor = true;
cout << "Loaded " << filename << "." << endl;
if (noColor)
cout << "This cloud has no RGBA color information present." << endl;
else cout << "This cloud has RGBA color information present." << endl;
// Second mode, start fetching and displaying frames from the device.
openniGrabber = new OpenNIGrabber();
if (openniGrabber == 0)
return -1;
boost::function<void (const PointCloud<PointXYZRGBA>::ConstPtr&)> f =
boost::bind(&grabberCallback, _1);
viewer = createViewer();
if (justVisualize)
if (noColor)
else viewer->showCloud(cloudptr);
else openniGrabber->start();
// Main loop.
while (! viewer->wasStopped())
if (! justVisualize)
Save and close.
Follow the same steps you used to build PCL. That is, create a new build/ subdirectory next to the src/ one. Open a terminal there and issue:
cmake -DCMAKE_BUILD_TYPE=Release ..
Still from the same terminal, run the compiled example program:
After some seconds, the main window will appear and the application will start grabbing frames from the device. You can inspect the current point cloud using the mouse, holding the left button to rotate, the right one (or the mouse wheel) to zoom, and the middle one to pan the camera around. At first, you may see only a black screen, or some big colored axes, but no cloud. Try zooming out, to see the whole scene. Another useful key is R, which will reset the camera parameters when pressed. Use it whenever you notice that zooming has gotten slow after some camera movement, or if you still can not see the cloud. See the PCLVisualizer tutorial for additional controls and features.
Whenever you feel ready, press the SPACE key. The program will pause for a fraction of a second and the output "Saved inputCloud0.pcd." will appear on the console. Check the current folder to see that file inputCloud0.pcd has indeed been written. You can now close the program with Q or Alt+F4.
Next, run it again giving the following parameter:
./openniViewer -v inputCloud0.pcd
This will tell the program not to take data from the device, but from the saved point cloud file instead. After it loads, you will realize that you are presented the same scene you saved to disk.
NOTE: PCD data is saved relative to the sensor. No matter how much you have manipulated the view, it will reset to default when you load the file.
At this point, your Kinect device should be working and getting depth data for you. There is a collection of excellent tutorials for PCL in the official webpage. I encourage you to finish them all before proceeding your experiments with the Kinect sensor. You can also find a good introduction/tutorial at the PCL library here.
If you use an ASUS Xtion PRO device instead, you should have gotten everything to work without problems or additional steps (except maybe for this one).
Go to root: PhD-3D-Object-Tracking
Links to articles:
PCL/OpenNI tutorial 0: The very basics
PCL/OpenNI tutorial 1: Installing and testing
PCL/OpenNI tutorial 2: Cloud processing (basic)
PCL/OpenNI tutorial 3: Cloud processing (advanced)
PCL/OpenNI tutorial 4: 3D object recognition (descriptors)
PCL/OpenNI tutorial 5: 3D object recognition (pipeline)


text:
can you respond to post #74
Receive input from a temperature sensor in AS3/AIR
I want a simple game for children, not a complicated one
Let's start to simplify the game
I will try to simplify the design as well as simplify the programming
Please give me more time
I have not heard from you for a while. The game will be pool? Hey let me know if we can move this project to AS3 where i'll be able to leave better script comments and video demonstrations with me speaking your language using a translator to learn, this is for the professor to present to the student correct?
I suffer from covid-19
Wow thats depressing, sorry to hear that.
thanks my friend
Soon we will meet in programming a new file
Ok, I will be working on an adobe air activation code scanner if you would like the game to have physical packaging to help with the selling. here
Last edited by AS3.0; 06-22-2021 at 08:21 AM.
Thank you my friend, I don't want this
hi @kofa u have website for swishmax references please share
Its just like as 2.0 post a thread on this forum section on what you need.
hello ctindia2009
Hello, I will get to the mask fix tomorrow, it works alittle with the other mask.
I was prototyping some packaging and I used your pool game for this preview:
good luck
Forum Rules
Advertiser Disclosure:
Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

subset: commoncrawl


text:
An enchanting land of pink sand and turquoise waters — discover that paradise is in fact a reality. Bermuda may be so British that the police are constables and the countries share a royal family, but the traditional Bermudan breakfast is codfish, potato and banana — yep, this island puts its own spin on tradition. Sail on Carnival's Bermuda cruises and you'll experience this unique cultural cocktail, along with a serious helping of natural beauty. This palette of an island, combining green hills, pastel-colored homes, and pink-sand beaches makes the perfect backdrop for world-class golf, glass-bottom boats, swimming with dolphins, mountain biking and shopping. And thanks to the mild, comfortable climate, tea time's an outdoor event, year-round. Treat yourself to a getaway that's both proper and perfectly relaxed when you choose one of Carnival's cruises to Bermuda.
We've got some daydream options for you.
* Taxes, fees, and port expenses additional.


text:
|This document is available in: English Castellano Deutsch Francais Turkce
by Baybora Baran and Seckin Gokaltun
<baybora(at)be.itu.edu.tr, gokaltun(at)itu.edu.tr>
About the author:
We are two research assistants at the Informatics Institute of ITU. We work with engineering applications with computers and we use Linux for this... Seckin's, homepage is at www.be.itu.edu.tr/~seckin
In this article you will learn how to build an interactive
graphics program written in Fortran. PGPlot is
the list of subroutines we need to use with our Fortran code.
We will be describing the installation and some applications of
PgPlot subroutines. Two examples are going to be demonstrated,
with Fortran codes included, which will give you an idea of possible
applications you can make with PgPlot.
The PGPLOT Graphics Library is a Fortran- or C-callable, device-independent graphics package for making simple scientific graphs. It is intended for making graphical images of publication quality with minimum effort. For most applications, the program can be device-independent, and the output can be directed to the appropriate device at run time.
The PGPLOT library consists of two major parts: a device-independent part and a set of device-dependent ``device handler'' subroutines for output on various terminals, image displays, dot-matrix printers, laser printers, and pen plotters. Common file formats supported include PostScript and GIF. PGPLOT itself is written mostly in standard Fortran-77.
PGPLOT subroutines can be called directly from a Fortran-77 or Fortran-90 program. A C binding library (cpgplot) and header file (cpgplot.h) are provided that allow PGPLOT to be called from a C or C++ program; the binding library handles conversion between C and Fortran. PGPLOT has been tested with UNIX (most varieties, including Linux, SunOS, Solaris, HPUX, AIX, and Irix) and OpenVMS operating systems.
PGPLOT is not public-domain software. However, it is freely available for non-commercial use. The source code and documentation are copyrighted by California Institute of Technology with a few non-standard, system-dependent subroutines. To get to the installation file and instructions just click here.
Below we present some simple examples of PGPLOT applications in order to demonstrate the capabilities of PGPLOT.
but you can use any name. Unusualy (root) privileges
are not required to install PGPLOT, assuming you have write
access to the directories. A single distribution directory can
be used to install versions of PGPLOT for different
architectures in different target directories.
/usr/local/src/pgplot (distribution
/usr/local/pgplot (target directory)
cd pub/pgplot
get pgplot5.2.tar.gz
tar file.
gunzip and
tar to decompress the
archive and extract its contents. This will create the directory
pgplot (and subdirectories) in the current directory. Make sure
that your current directory is where you want to create the
``PGPLOT distribution'' directory tree.
cd /usr/local/src
gunzip -c pgplot5.2.tar.gz | tar xvof -
/usr/local/src/pgplot and
mkdir /usr/local/pgplotDo not try to create the PGPLOT library in the distribution directory.
drivers.list from the
distribution directory to the target directory, and then use a
text editor to select device drivers. This file contains one
line for each available device driver: delete the exclamation
mark (!) at the beginning of the line to include the driver, or
ensure that an exclamation mark is present if you want to
exclude the driver. Many of the drivers can be used only on
certain operating systems (see notes in
drivers.list), so include only the drivers you
plan to use. PGPLOT can later be reconfigured by restarting
the installation at this step. Most installations should
include: the null device (/NULL), PostScript printers (/PS,
/VPS, /CPS, and /VCPS), Tektronix terminals (/TEK, /XTERM, and
possibly other variants), and, if the X window system is
available on the target, the X window drivers (/XWINDOW,
/XSERVE). You may also wish to include drivers for GIF files
(/GIF, /VGIF) or some of the other printers.
cd /usr/local/pgplot cp /usr/local/src/pgplot/drivers.list . vi drivers.list (or use your preferred editor)
makemake, to generate a standard UNIX
makefile for your operating system, compilers, and list of
selected PGPLOT device drivers. Operating-system and compiler
information is obtained from a configuration file.
Configuration files are available for the following systems. If
your configuration is not one of those listed, or if you have
trouble using the generated makefile, see below for information
about creating your own configuration file.
f77 invokes the
GNU g77 compiler, then you cannot use a configuration file
designed for, say, a SPARC f77 compiler. You will have to
create a special configuration file. In the following table,
Arg#2 is a code for the operating system, and Arg#3 is a code
for the Fortran and C compilers. For more information about the
supported systems, see the file
pgplot/sys_*/aaaread.me, where * stands for one of
the options for Arg#2.
Arg#2 Arg#3 ------ ------ aix xlf_cc alliant fortran_cc bsd g77_gcc convex fc_cc cray cf77_cc epix2 f77_cc (Control Data EP/IX 2.x) freebsd f77_cc fujitsu uxpm_frt_cc fujitsu uxpv_frt_cc hp fort77_c89 hp fort77_gcc irix f77_cc linux absoft_gcc linux f77_gcc linux g77_elf linux g77_gcc next af77_cc next f2c_cc next g77_cc next gf77_cc osf1 f77_cc osf1 f77_cc_shared sol2 f77_cc (Solaris 2.x, SunOs 5.x) sol2 f77_gcc sol2 f90_cc sol2 g77_gcc sun4 f77_acc (SunOS 4.x) sun4 f77_cc sun4 f77_gcc ultrix f77_ccIf your system is one of those listed, proceed as follows: Make the target directory your current default directory, e.g.,
cd /usr/local/pgplotExecute the script
makemake from the distribution
directory: e.g.,
/usr/local/src/pgplot/makemake /usr/local/src/pgplot linuxThe first argument supplied to
makemake is the
name of the distribution directory. Note that when you run
makemake, your current default directory should be
the target directory, i.e., the directory in which you want to
put the compiled library.
drivers.list file. Go back
to step 4!
baybora@bilgi>../pgplot/makemake ../pgplot linux g77_gcc
For additional information, read file ../pgplot/sys_linux/aaaread.me
Reading configuration file: ../pgplot/sys_linux/g77_gcc.conf
Selecting uncommented drivers from ./drivers.list
Found drivers NUDRIV PSDRIV XWDRIV
Creating make file: makefile
Determining object file dependencies.
makemake generates a file
makefile for subsequent use, a Fortran file
grexec.f that calls the selected device drivers,
and a text file
rgb.txt that contains color
definitions for use by routine PGSCRN. (If you already have a
rgb.txt, possibly modified with your own
custom definitions,
makemake does not modify it.)
It also copies two Fortran include files that will be needed
during compilation. So at this stage you will have at least the
following files:
makemake says that it found corresponds to those
you selected in
drivers.list. If your UNIX system
is not one of the supported systems listed above, create your
own configuration file in the target directory, with name
local.conf. It is best to copy one of the
configuration files provided (from
pgplot/sys_*/*.conf, and then edit it following
the comments in the file. The
makemake procedure
will use
local.conf if it exists in the current
directory, and if you do not specify Arg#3. Note that you must
still specify Arg#2 (operating system).
make command to compile the
PGPLOT library following the instructions in
makeBy default,
make will generate: an object-module
libpgplot.a; a shareable library (if
possible on the selected operating system), the binary PGPLOT
font file
grfont.dat, the demonstration programs
pgdemo*, and a documentation file
pgplot.doc. In addition, if the /XWINDOW and/or
/XSERVE driver was selected in step 4, it will generate a
pgxwin_server, and if the /XDISP driver
was selected, it will generate a program
If this step proceeds satisfactorily, you may want to type
make cleanto remove not needed intermediate files. You will then have the following files in the current directory:
grfont.dat (binary font file)*
libpgplot.a (PGPLOT library)*
libpgplot.so (shared library, optional)*
pgdemo1 ... pgdemo16 (demonstration programs)
pgdisp (required by /XDISP driver)*
pgplot.doc (ASCII documentation file)
pgxwin_server (required by /XWINDOW driver)*
rgb.txt (color name database)*
pgmdemo (executable demo program)
libXmPgplot.a (object library required by PGPLOT/Motif applications)*
XmPgplot.h (header file required by PGPLOT/Motif applications)*
libtkpgplot.a (object library required by PGPLOT/Tk applications)*
pgtkdemo (executable demo program)
pgtkdemo.tcl (script used by demo program)
tkpgplot.h (header file required by PGPLOT/Tk applications)*
PGPLOT_DIR is correctly defined. This is the name
of the directory in which PGPLOT will look for the files
grfont.dat and
rgb.txt (unless
environment variables
PGPLOT_FONT and
PGPLOT_RGB are defined to override this default
behavior), and, if needed, the X-window server program
UNIX csh or tcsh: setenv PGPLOT_DIR /usr/local/pgplot/
UNIX sh or bash: PGPLOT_DIR="/usr/local/pgplot/"; export PGPLOT_DIR
PGPLOT_DEV, e.g.
UNIX csh or tcsh: setenv PGPLOT_DEV /xwindowWhen using a UNIX shared library (e.g., on Solaris 2.x), you may also need to put the PGPLOT directory in your loader search path, defined in environment variable
LD_LIBRARY_PATH. To run a program, type its name
(with directory if the current directory is not in your path):
./pgdemo1All the demonstration programs prompt for a device name and type. Type a question mark
? to see a list of the
available device types and verify that PGPLOT has been
configured properly. Points to check for: the PGPLOT program
correctly reads the font file and displays superscripts,
subscripts and special characters (pgdemo2); the PGPLOT program
can read the color database (pgdemo10); on interactive devices,
the cursor works correctly (pgdemo5, pgdemo6).
PROGRAM EX1 INTEGER PGOPEN, I REAL XS(9), YS(9), XR(101), YR(101) C Compute numbers to be plotted. DO 10 I=1,101 XR(I) = 0.1*(I-1) YR(I) = XR(I)**2*EXP(-XR(I)) 10 CONTINUE DO 20 I=1,9 XS(I) = I YS(I) = XS(I)**2*EXP(-XS(I)) 20 CONTINUE C Open graphics device. IF (PGOPEN('?') .LT. 1) STOP C Define coordinate range of graph (0 < x < 10, 0 < y < 0.65), C and draw axes. CALL PGENV(0., 10., 0., 0.65, 0, 0) C Label the axes (note use of \u and \d for raising exponent). CALL PGLAB('x', 'y', 'PGPLOT Graph: y = x\u2\dexp(-x)') C Plot the line graph. CALL PGLINE(101, XR, YR) C Plot symbols at selected points. CALL PGPT(9, XS, YS, 18) C Close the graphics device. CALL PGCLOS END
This plots the following graph:
In order to execute the code above successfuly, you need to link the PGPLOT library and the X11 libraries with your code. The following script achieves that:
g77 your_code_name.f -L/X11directory/ -lX11 -L/PGPLOTdirectory/ -lpgplot
You need to include the following files into the directory where you are running your code:
grfont.dat rgb.txt pgwin serverjust copy these files from the pgplot directory to the directory where you are running your code.
In this application, our aim was to mark three points on the screen via clicking with the mouse and then let Fortran code draw the circle passing through these three points. This problem was an assignment in our Computational Geometry class, conducted by Dr.Serdar Celebi (mscelebi(at)itu.edu.tr).
The following routines define the background and setting for the area that the graph is going to be plotted on. Detailed usage of these subroutines are explained in the PGPLOT manual. (see link to the PGPLOT homepage at the end)
call PGSCR(0,1.0,1.0,1.0) !set color representation
call PGENV(-50.0,50.0,-50.0,50.0,1,1) !set window and viewport and draw labeled frame
call PGSCI(1) !set color index
call PGSFS(2) !set fill-area style
We use the following routine, PGPT1, to draw a pointer at the point we want to mark with the mouse.
.. ... WRITE (*,*) 'Cursor mode:', MODE GOTO 10 END IF CALL PGPT1(X, Y, 3) !draw one graph marker ic=ic+1 xp(i)=x yp(i)=y
After we marked 3 different points on the screen, the Fortran code calculates the center and then draws the circle passing through these 3 points.
.. ... c-----find the radius---------------- r=(xcenter-xp(1))**2+(ycenter-yp(1))**2 r=r**0.5 c-----draw the circle------------------- call PGCIRC(xcenter,ycenter,r) !draws a circle goto 1 ... ..
We draw the circle with the routine shown above, "PGCIRC". You can clear the pre-drawn circle and assign the points from the beginning to draw another circle on the same drawing area. The complete code is included in the references (see Ref. circle.f).
In this application, our aim was to plot an approximation
curve through the various discrete points marked by the mouse
on the screen and then to draw the porcupine lines on this
The porcupines are the lines that are used to detect unwanted inflection points, flat parts of a curve, and discontinuities in curvature. That's why it is an important concept in Computational Geometry.
We developed a code that uses least square approximation to
draw a curve of the desired order (1~4) through a set of points
which can be randomly generated by the user through a graphical
interface by using the mouse. It has the ability to draw
porcupines on the curve (whose frequency can be adjusted by the
user) is an indicator to the curvature of
the curve.
Skipping the details of the Fortran code we have written, we present here the graphical results (You find the code at the end of the article).
We first enter discrete points on the screen with the mouse and the Fortran code takes the coordinates of these points and stores them in an array. Then it approximates the curve passing through these points at the degree the user indicates.(1-4)
Then the porcupine lines are drawn on the curve. The number of porcupine lines can be modified by the user, and without changing the background or the points the new set of porcupines can be drawn on the same curve.
The frequency of the porcupines can also be increased as seen below. Also the program can draw a new curve on the same set of data.
Webpages maintained by the LinuxFocus Editor team
© Baybora Baran and Seckin Gokaltun, FDL
Click here to report a fault or send a comment to LinuxFocus
Translation information:
2002-10-09, generated by lfparser version 2.30


text:
Showing all 5 results
Please use our booking systems below to reserve a space at Pamela. However, we always keep space for walk-ins. For large groups, please e-mail.
428 Kingsland Road
London E8 4AA
[email protected]
020 7686 3212
Please e-mail us
Suscribe to our mailing list and follow us to stay updated about Pamela offers.


text:
When I received my receipt from my last purchase at the local Whole Foods Market, there was also an attached coupon for $10 off $50 purchase at one of two new Whole Foods Massachusetts stores (Melrose and Weymouth).
Of course I wanted to check out the closest one in Melrose, so I planned a shopping trip on Friday, which was also their one-day sale for Alaskan Coho salmon ($10/lb).
I knew the Melrose location was previously a Johnnie's Foodmaster store, so I wasn't sure how large the store would be, in comparison to other stores. As I suspected, it is smaller, and crowded, especially when trying to navigate a shopping cart in the produce area, during lunchtime on a Friday.
If the produce area wasn't cramped enough, the "bulk" section is also situated in the same isle, which makes it very difficult to get near with a cart; same with the salad/food bar on the other side of the store. But I was patient, and just went with the flow.
The employees (or team members) were extremely nice, which made up for the lack of space. I had a lovely conversation with the man behind the fish counter about salmon pin bones, and the woman who helped me with my probiotics return/refund was very cheery.
I was disappointed though, when I arrived at check-out and the cashier gave me a little bit of attitude. I always put my poultry and meat purchases in one particular re-usable shopping bag, and I've never had any issues at the stores when I leave the meat inside the bag. The cashiers (even newbie ones) usually understand the process and scan each item from the bag then pack them back into my bag afterward.
Well this particular cashier proceeded to unpack all my poultry items onto the belt, coming inches close to my produce. I became annoyed, and told her that I didn't want the meat touching/contaminating my other items, to which she rudely proclaimed that my fish was already touching the items (as if it was MY fault), and I told her it wasn't the same as poultry, and that I wasn't worried about the fish. I never raised my voice, and I didn't take the issue further, but I could tell that she was not happy with me as she scanned the rest of my items.
If she just left my poultry in the bag, she could have easily scanned each piece and simply re-packed, like the dozens of other cashiers have done. But instead she was rude.
I'm not out to get her into trouble, and I am not one of those entitled shoppers that think customer service workers need to kiss up to me. (In fact, I really hate that!) But in this case, a little bit of the "customer-is-always-right" should have come into play.
I spend a lot of money on my groceries, and I choose specific items (especially perishable produce) very carefully, so I expect the food to arrive into my home in the same condition that I chose it. (Not covered in poultry bacteria.)
She should have seen that the situation upset me, and immediately tried to make it right, instead she tried to prove me wrong. It was something I rarely ever encounter at Whole Foods Market. They do a remarkable job at defusing any customer issues before they escalate.
But all in all, the experience was positive at this new store and I was thrilled to use my $10 off coupon!
It makes me happy that the Melrose area now has a Whole Foods, as it'll be a benefit to the community. It was also wonderful to see local produce being sold there, but at the same time, I would rather consumers support their local farmers directly at a farmstand or farmers market.
But if shopping at Whole Foods is the first step in getting people to consciously eat more local produce, then that is what matters. The next natural step will then be seeking out a farmers market or buying into a CSA.


text:
CONCORD, N.C. – Kevin Harvick thought his eyes were playing tricks on him. Surely, he told himself as he drove by the front stretch, that can't be a cable hanging down on the track.
"I saw this streak go by me and I'm like, 'What in the (heck) was that?'" Harvick said after winning the Coca-Cola 600 for the second time in three years on Sunday.
"I always have this thing with my eyes. It's one of the biggest things we have as drivers. You got to believe in your eyes. I tell myself you've got to believe what you see. I was hoping it wasn't my last race, I was hoping what I saw was right."
It was right. Weird, but right.
Turns out the nylon rope from an overhead camera system used by Fox Sports had snapped and fallen on the track. It messed up a few cars, caused a red flag to be dropped and injured 10 fans — three of whom had to be transported to the hospital.
That was the type of night it was at Charlotte Motor Speedway. And the fact that such a crazy race was run under a full moon only added to the oddity.
It included four multi-car accidents that took out several notable drivers, including Dale Earnhardt Jr., Jimmie Johnson, Brad Keselowski, Kyle Busch, Matt Kenseth, Jeff Gordon and Danica Patrick.
Harvick managed to avoid those wrecks and beat Kasey Kahne on a restart with 11 laps remaining to capture his 21st career Sprint Cup victory.
"This is one of those nights you just know going into it you got to grind away lap after lap, just keep yourself on the lead lap, not make any mistakes," Harvick said.
When Kahne decided not to pit and take on tires at lap 389, Harvick pulled down pit lane and took on two and came out in second place for the restart. He said right then he knew he had the race in the bag.
"The only frame of mind I was in was, 'Don't screw up,'" Harvick said. "I knew they put me in the best position to win the race. You don't want to make a mistake on the restart."
He didn't.
"We needed to get those two tires because I think heads up our car wasn't as good as the 5 car," Harvick's crew chief Gil Martin said. "We definitely needed to get tires at that point. When they didn't brake to come down pit road, I felt like that gave us a chance to have equal cars with them because they were very strong all night long."
The race was stopped for nearly 30 minutes when the TV camera support rope snapped and landed along the track and in the grandstands.
The cars were brought into the pits and cleanup crews coiled up the long sections of rope as if they were putting away a garden hose. Drivers were allowed back to their pit stalls and crews given 15 minutes to assess and fix damage caused by the failure.
In a statement, Fox said it had suspended use of the overhead camera indefinitely. It said drive rope that moves the camera back and forth failed but the network offered no immediate reason why.
"A full investigation is planned," the statement said.
Kahne finished second, Kurt Busch third and polesitter Denny Hamlin was fourth in his second full race since returning from injury. Ryan Newman was sixth, followed by Tony Stewart, Clint Bowyer, Martin Truex Jr. and Marcos Ambrose.
Harvick's win was almost as big a surprise as it was in 2011 when the crowd anticipated Earnhardt ending what was then a long, long victory drought.
Kyle Busch might want to look into why he can't seem to win a Sprint Cup race in Charlotte.
He entered as a favorite after winning the Truck Series event last week and powering to a Nationwide Series victory Saturday. He was in the lead, though, when the nylon guide rope snapped and ran smack over it. Busch heard what he termed a "thunk" and knew he had problems.
Busch's team got the car back in winning shape and he continued near the front. However, his race ended for good on lap 257 when his engine failed.
"Catastrophic engine failure. Seems to be that time of year," said Busch, who has yet to win a Sprint Cup event at the track he calls his favorite.
Busch did praise NASCAR for halting the race and allowing teams to repair damage, which he said was unrelated to his engine problems.
About the same time Busch's engine failed, Earnhardt's race concluded with a similar problem. Earnhardt had smoke and oil pouring out on lap 257. Greg Biffle slipped into the wall, sending him to the garage, and Dave Blaney and Travis Kvapil collided.
"We didn't have a really good car," Earnhardt said. "We know why. We can go back and feel like we can rebound from this real quick."
That started a series of incidents which ended things for some of NASCAR's most popular and successful drivers.
Keselowski and Patrick saw their chances end on lap 319 when they collided on a restart. It appeared that Patrick's boyfriend, Ricky Stenhouse Jr., forced her car up the track and she clipped Keselowski, who began his day in the Penske pits at the Indy 500.
On the following restart, Martin clipped Aric Almirola and set off a six-car wreck that snagged Gordon and Stenhouse.
Kurt Busch, leading at the time, suddenly lost power and needed a wrecker to push him along into the pits to change the battery. He returned to the track in 15th place.
And the problems weren't over, either.
Truex Jr. brushed series points leader Jimmie Johnson on the next restart to send the five-time champion skidding sideways and collecting Matt Kenseth, who leads the series with three victories this year and led 112 laps at Charlotte.


text:
19 Year Old Twink Gets Fucked Raw At A Halfway House
Boys Halfway House has earned another blog appearance with this hot new release that features a sexy twink taking a fat cock up his ass bareback. It's a slow quite day at the halfway house as most of the boys had a court appearance and other court mandated activities to take care of. The manager of the halfway house is alone with Gideon, a new resident who has had a rough time and trying to get his life back on track. The manager finds Gideon playing on his phone and not doing the chores he was assigned. He gets his phone taken away and the house manager feels like he needs some punishment. The manager pulls out his thick cock and makes Gideon give him a hand job before telling him to suck on his thick cock. Gideon takes off his clothes and starts sucking on the managers thick cock while getting his ass fingered and played with. Gideon has a tight ass as nothing has ever been in there before, but the manager is determined to loosen up this twink hole by finger banging him. Once Gideon's ass is loosened up, the house manager slides his raw cock deep inside his twink hole. The manager fucks him slowly at first so as not to hurt this 19 year old twink. After Gideon's ass is relaxed, the manager starts fucking him harder and harder. The manager pulls out and makes Gideon suck on his fat cock again for some hot ass to mouth action. The fucking continues however when Gideon really gets his ridden. The manager really wants to make a creampie in that hot ass so he rams his cock inside of Gideon hard and fast until he is about to cum. When the manager starts to jizz, he pulls out and sprays Gideon's ass full of cum. Fucking hot!
Click here to watch this full length straight twink getting bareback fucked gay sex video and hundreds more amateur gay porn videos at Boys Halfway House.
Click here to watch this full length straight twink getting bareback fucked gay sex video and hundreds more amateur gay porn videos at Boys Halfway House.


text:
About the Author
Simone Lake, MTS, has a Masters in Theology Studies and specializes in the areas of prayer, spiritual disciplines, spiritual renewal, inductive Bible teaching and apologetics. She is certified as a chaplain for the North America Mission Board (NAMB).
Simone has over 20 years of ministry experience and currently serves alongside ...
Read more about Simone Lake
Deep Roots in Christ Curriculum
Benefits the courses include:
• Experience in-depth training from a Biblical perspective
• Clarity, focus and application for current and future goals
• Motivation to implement continual growth
• Match your gifts, desires and learning styles to a
personalized plan
• Discover resources to aid in your growth
• Confidential environment
• Identify tools to customize strategies and plans
Read more ...


text:
Sicilian Escape
Escape to Sicily for seven days of beauty, cuisine, and history—without the crowds you'd find in the high-season. Begin in Palermo to meet your Tour Director and traveling companions for a sumptuous Italian welcome dinner. Spend the following day on a guided sightseeing tour of Palermo's ornate Piazza Bellini and Capo Market. See the stunning baroque features of the Church of the Immacolata, and visit the historic Palermo Cathedral. Enjoy the panoramic view of the Conca d'Oro in Monreale, and visit the 12th-century Norman Cathedral with its treasured byzantine mosaics.
Walk through the 24-centuries-old Valley of the Temples with your Local Guide in Agrigento, visit Piazza Armerina's Villa Romana del Casale to admire the world's largest collection of Roman mosaics. In Syracuse, the birthplace of mathematician Archimedes, you'll take a guided visit to the 5th-century-BC Greek Theater, Garden of Paradise, Ear of Dionysus, Altar of Hieron II, Roman Amphitheater, and the Cordmaker's Cave. Travel to Catania, where you'll sample Sicily's famous Arancino, and spend two nights on the spectacular Taormina Riviera, your base for a fascinating excursion to Mount Etna—the largest active volcano in Europe. Explore Taormina, and will complete your Sicilian Escape with a fabulous farewell dinner. You'll treasure the time spent exploring Sicily's famous sights and stunning scenery—without the crowds of the busy travel season on this spectacular guided tour of Sicily!
City Highlights
PALERMO Welcome dinner; guided sightseeing, visit the cathedral and the Norman cathedral in MonrealeAGRIGENTO Guided walking tour of the Valley of TemplesPIAZZA ARMERINA Guided visit of the Villa Romana del Casale SYRACUSE Guided visit of the archaeological site CATANIA [LF] Arancino tastingTAORMINA Mount Etna excursion; orientation of the hill-top town; farewell dinner at a local restaurant
Full buffet breakfast daily; 3 three-course dinners with wine including a welcome dinner in Palermo and a farewell dinner in Taormina
Hotels listed may occasionally be substituted with alternative hotels of equivalent standard.
Motorcoach. Free wi-fi available on your motorcoach and in most hotel lobbies