Personal Profile


Python Primer for the Impatient

Python programming language logo

Python is one of the scripting languages supported by GLSL Hacker. Here is a quick introduction to the essential notions and syntax of Python programming language. All following notions are general and are not specific to GLSL Hacker. Thanks to this primer, you will be able to quickly tweak and hack GLSL Hacker demos. GLSL Hacker 0.5.0 is available with a Python 2.7 plugin.

The reference manual of Python 2 can be found HERE.

This primer does not cover advanced topics like object oriented programming. It follows the same line than Lua Primer fro the Impatient: providing a quick way to read and write basic Python programs or scripts.

1 – Comments

Python supports two kinds of comments: single line comments and multi-line comments.

Single line comment: #

# this is a single line comment in Python

Multi-line comment with triple quotes: “””

this is a 
comment in Python

2 – Variables

Variables in Python have a type but there is no type declaration. Common types are numbers (float, integer), strings, lists, tuples and dictionnaries. Variables defined in a function have local scope while Variables defined outside functions have global scope.

num_vertices = 0 # integer variable
width = 10.25 # float variable
mesh_name = "my_kool_mesh" # string variable

Tuples use parentheses while lists use brackets. Tuples can’t be updated, their size can’t be changed while lists can be updated, elements can be added or removed.

shader_tuple = ('Vertex', 'Fragment', 'Geometry') # tuple

program_list = ['prog01', 'prog02', 'prog03'] # list

Dictionnaries is a kind of hash table and are made up of pairs of key:value. The key is usually a number or a string.

node_dict = {} # dictionnary
node_dict['node01'] = 100
node_dict['node02'] = 101
node_dict['node03'] = 102

To sum up:

my_tuple = ()
my_list = []
my_dict = {}

You can convert a type to another type with float(), int(), str(), tuple() or dict():

x = 10
x_str = str(x)

To concatenate strings, just use the + operator:

space = " "
app_name = "GLSL" + space + "Hacker" 

3 – Indentation

Unlike C, PHP or Lua, Python does not have braces to delimit blocks of code like functions or tests. To delimit blocks of code, Python uses indentation and indentation is severely inspected by Python, The smallest difference in indentation leads to fatal compilation error! So be careful with indentation and use a correct text editor to handle indentation properly.

4 – Functions

Functions in Python can take multiple arguments and can return multiple results.

def myKoolFunc(a, b, c):
  # indentation!!!
  # Do something useful with a, b and c:
  sum = a+b+c
  avg = sum/3
  return sum, avg

x, y = myKoolFunc(1, 2, 3)

5 – Operators

Comparison: The comparison operators are the same than in C language:

  • equal: (a == b)
  • not equal: (a != b)
  • greater than: (a > b)
  • greater than or equal: (a >= b)
  • lesser than: (a < b)
  • lesser than or equal: (a <= b)


  • and: (a and b)
  • or: (a or b)


  • binary AND: (a & b)
  • binary OR: (a | b)
  • binary left shift: a << b
  • binary right shift: a >> b
  • binary XOR: (a ^ b)
  • binary complement: ~a

6 – Control Structures

Conditional tests:

if (a == x):
  # do something
elif (a == y):
  # do something
  # do something



for i in range(0, 10):
  # do something

for i in "GLSL Hacker":
  print(i) # print current letter

for v in range(len(vertices_list)):


while (i < 10):
  # do something
  i += 1 

7 – Built-in functions

Python comes with a ton of modules and that’s one of the strength of Python:

Fans of Python use the phrase batteries included to describe the standard library, which covers everything from asynchronous processing to zip files. The language itself is a flexible powerhouse that can handle practically any problem domain. Build your own web server in three lines of code. Build flexible data-driven code using Python’s powerful and dynamic introspection capabilities and advanced language features such as meta-classes, duck typing and decorators.

There are so many modules and functions in Python standard library and I’m not going to list them here. Nonetheless, I can give you an example of the use of platform module to get the version of Python. To use a module, use the import keyword:

import platform
py_version = str(platform.python_version())

There is a demo in GLSL Hacker Code Sample Pack that shows the use of the platform module:

GLSL Hacker - Python platform module test

GLSL Hacker – Python platform module test

Like in Lua, Python has a math library:

import math
s = math.sin(radians)
c = math.cos(radians)
p = math.pow(x, y)

There’s also a random module:

import random
# possible values for y: 2, 3, 4 and 5.
y = math.randint(2, 5) 

The string module is also very useful…

An Introduction to Virtual Reality

What is Virtual Reality? Virtual Reality is a set of computer technologies which, when combined, provide an interface to a computer-generated world, and in particular, provide such a convincing interface that the user believes he is actually in a three dimensional computer-generated world. This computer generated world may be a model of a real-world object, such as a house; it might be an abstract world that does not exist in a real sense but is understood by humans, such as a chemical molecule or a representation of a set of data; or it might be in a completely imaginary science fiction world.

A key feature is that the user believes that he is actually in this different world. A second key feature of Virtual Reality is that if the human moves his head, arms or legs, the shift of visual cues must be those he would expect in a real world. In other words, besides immersion, there must be navigation and interaction.

1. Computer mediated sensing

Different kinds of VE technology support different modes of interaction.

  • One kind of VE technology employs subjective immersion, in which the user interacts as if using an ordinary desktop computer system. The user views the system from the usual close but remote position and interacts through standard or special-purpose input or control devices such as keyboards, mouse controls, trackballs, joysticks, or force balls. Three dimensions are represented on 3D displays through the use of simulation software employing perspective, object rotation, object interposition, relative size, shading, etc.
  • The other kind of VE technology uses spatial immersion. The user is required to get inside the virtual space by wearing special equipment, typically at least a helmet mounted display that bears sensors to determine precise helmet position within the VE system’s range, in order to interact with the simulated environment. The user is thus immersed in a quasi-3D virtual space in which objects of interest appear to exist and events occur above, below, and around in all directions toward which the user turns his or her head.

Here follows a description of the typical hardware needed to run a virtual reality system. It will later be discussed whether it’s advisable to maintain all of these components when trying to implement a VE on a PC. What is important here is to focus on a standard architecture, as it is usually described in literature.

Virtual Reality is often used as comprehensive term to describe the use of 3-D graphics displays to explore a computer generated world. This interaction between man and machine can happen according to different styles that are representing the actual possibility and potential of the technology. The different styles of interaction depend upon the way the virtual environment is represented. We can identify at least six interaction styles that refer to the way the simulated/virtual environment is represented: desktop, projected, immersive, Cave, telepresence, augmented.

1) Desktop VR

The most popular type and is based upon the concept that the potential user interacts with the computer screen without being fully immersed and surrounded by the computer-generated environment. The feeling of subjective immersion can be improved through stereoscopic vision (i.e., CrystalEyes) and operative action with interface can be guaranteed via pointing devices (mouse, joystick) or typical VR peripherals such as Dataglove. Desktop VR is used mainly in games but professional application are currently widely diffused. Example of professional application domains come from general industrial design, engineering, architecture and the visualisation of data streams. The main benefit of desktop VR is its limited cost and less involving use of interacting technology, as a matter of fact according to different scenarios of use it might be more appropriate a less “invasive” device such as a CRT monitor than a wired HMD. It seems that desktop VR is particularly successful with the inspection of sample objects as opposed to immersed VR where the best exploitation is with the exploration of spaces. Up to date CAD/CAM systems slowly shifted in their performance towards the quality of VR interaction when they allowed the user to manipulate 3-d objects as if they were real.

2) Projected VR

This is technological solution often seen in VR-Art shows and in VR leisure applications. It is based upon the overlapping of the image of the real user on the computer generated world. That is to say that the user can see his image overlaid the simulated environment. A special movement tracking device can capture the movements of the user and insert them so that they can cause actions and re-actions in the virtual world.

3) Immersive VR

With this type of solution the user appears to be fully inserted in the computer generated environment. This illusion is rendered by providing HMD, with 3-D viewing and a system of head tracking to guarantee the exact correspondence and co-ordination of user’s movements with the fee-back of the environment.


Cave is a small room where a computer generated world is projected on the walls. The projection is made on both front and side walls. This solution is particularly suitable for collective VR experience because it allows different people to share the same experience at the same time. It seems that this technological solution is particularly appropriate for cockpit simulations as it allows the views from different sides of a imaginary vehicle.

5) Telepresence

Users can influence and operate in a world that is real but in a different location. The users can observe the current situation with remote cameras and achieve actions via robotic and electronic arms. Telepresence is used for remote surgical operations and for the exploration/manipulation of hazardous environments (i.e., space, underwater, radioactive.

Virtual Reality is the product of a trick. The VR system tricks the user into believing that the Virtual Environment by which he feels himself surrounded is the actual, real environment. This is made possible by several different devices, each with its own technology, which produce each a specific aspect of the VE, relevant for a specific sense. We will discuss hardware relevant for the three senses which are to be immersed in the VE: sight, touch and hearing.

6) Augmented

This VR solution is an invasive strategy towards reality. As a matter of fact user’s view of the world is supplemented with virtual objects and items whose meaning is aimed at enriching the information content of the real environment. In military applications for instance vision performance is enhanced by providing the pictograms that anticipate the presence of other entities out of sight.

2. VR market analysis

In the Information Technology trend, Virtual Reality has been identified as one of the most promising development areas. As it happens with all the innovative applications this new technology is not excluded from the generation of problems and concerns regarding its implementation in operative working domains. Yet we are witnessing a constant improvement in marketing perspective of both quality of applicative VR systems and receptiveness of potential customers. This is due to mainly three reasons: (1) the decrease of the cost of VR systems and devices (2) the constant improvement of performance reliability of the technology, (3) the extremely valuable economic benefits derived from VR use in its various forms and purposes (training, simulation, design). So we can affirm the consolidation of a class of technology that can positively be stated as “virtual reality” and appraised like any other novel high tech industry. This technology has been confidently adopted in a number of markets, and has the potential to penetrate in many more.

The VR market is at present immature, without any clear market leaders or clear segmentation of activities. In a recent paper prepared for the European Commission’s IT Policy Analysis Unit (DG III/A.5) on VR, PVN (Belgium) estimates a market of $570 million (MECU 483) by 1998. This figure includes both hardware and software. The bad news for Europe is that it is forecast to have only $115 million (MECU 97) of that market, a poor third behind the USA and Japan.
A study into telematics applications of virtual environments, carried out by Sema Group (F), Fraunhofer IAO (D) and MIT’s Research Laboratory for Electronics (USA) for the Commission’s DG XIII/C in 1994, predicted a market evaluation of “roughly MECU 400 – MECU 500 by 1998” with a growth rate “very high, approaching 70-80% per year”. What is perhaps less disputed is that the major market activity is in entertainment equipment.

Frost & Sullivan’s 1994 VR market report stated that about 250 companies existed in the USA and only 25 in other countries which claim to make even part of their revenue from VR. Of these, no one firm earned more than $10 million (MECU 8.4) from VR alone. A recent Financial Times Report listed four types of commercial VR company – software companies, component manufacturers, system companies and ‘other industry participants’. As might be expected, the vast majority of such companies are US-based. Only two European company, Superscape and Division of the UK, is listed under software companies and only one European Company, Virtuality, is listed under component manufacturers.

Although this listing was not ranked and was definitely not exhaustive, most activity does seem to be taking place in the USA. The wider availability of venture capital and the tendency of small firms to ‘spin off’ from others may account in part for this.

According to the recent (Jan. 96) Business Communications Company, Inc. report “RGB-175/The Virtual Reality Business”, by 1996, more than 300 companies will settle sales for about $255 million worth of VR products and services and behind this figures lay as VR customers many multinational brands of military and medical products. By 2000, the VR industry will be posting annual sales of over $1 billion and reaching an annual average growth rate (MGR) of 33%.

In July of 1996 Ovum, the UK market research company published another survey on Virtual Reality (VR) markets: ‘Virtual Reality: Business Applications, Markets and Opportunities. Ovum expects the ‘killer application’ of VR to be in 3D interfaces to the Internet, used for promoting products and services on the World Wide Web (WWW). It predicts that in the next five years, VR will be widely used as a GUI (graphical user interface) for standard business software, thus replacing icon-based GUIs for such applications as database, business systems and networked management software. According to the survey, a large proportion of companies polled indicated that they would use PC based VR training applications for their employees.

Regarding the present uptake of VR in business, the report concludes that ?companies are finding virtual reality an important source of competitive advantage? and that ?although some companies are taking their time to evaluate VR, which is slowing down the speed of market lift-off, many are reporting significant benefits and are increasing their use of VR technology.? It explains this expected increase in uptake by saying that ?In many cases, companies have made cost savings of over US$1 million. They have experienced faster time to market, fewer mistakes than when using CAD technologies, greater efficiency in working methods and improved quality in final products.?

The report predicts that the VR market will grow from US$134.9 million in 1995 to just over US$1 billion by the year 2001 and that the largest growth sector will be in the software sector with a 58 per cent annual growth in this period.

Another significant finding of the report is that the business market for VR in 1995 represented 65 per cent of the total, with entertainment applications accounting for only 35 per cent. VR is normally seen to be of major significance to the games market?. it is not known whether, and how, the authors distinguish between entertainment and ?the entertainment business?.

The Ovum survey foresees a radical shift in how companies will be using VR between now and the year 2001. Today the majority of VR applications are in design automation: virtual prototyping, interior design and ergonomics, and architectural and engineering design. Expensive, workstation-based systems currently dominate, accounting for 43 per cent of the market. By 2001, however, PC-based VR technology will account for 46 per cent of the business market, where most of the applications will be non-immersive, using computer screens instead of headsets.

Virtual Reality Market Forecasts by Application ($ millions, constant 1995 )

1994 1995 2000 AAGR% 1995-2000
Instructional & Developmental 70 95 355 31
Design & Development VR 25 30 150 40
Entertainment VR 60 110 500 35
Medical Treatment VR 10 20 50 20
Total 165 255 1055 33
Source: Business Communications Company, Inc., GB-175, The Virtual Reality Business, 1996

Applicative domains and major marketing areas

At the current state of the situation all marketing experts converge on the fact that the major market activity is entertainment equipment: leisure technology uses account for the largest VR market value, and are foreseen to continue growing at a 35% AAGR to the year 2000 (see table). The critical mass in marketing terms will be reached with high-scale produced single-user entertainment VR system, this will be the propelling force pushing the market growth from a current 1995 value of $110 million to $500 million by year 2000.

Home and entertainment

The great market expansion is expect for site- based entertainment. This expectation is based upon the evaluation two factors: the low saturation, and dramatic decrease of prices. This phenomena will allow VR technology to be used by all facets of society, including commercial/industrial, the government, military, and university and secondary schools at a stage not comparable with any previous existing situation. A great role will also be covered with in the support to education in general, for instance the instructional and developmental market is expected to widen its share from a $95 million 1995 market figure to $355 million by 2000, resulting in an AAGR of 31%. The dimension of this increase will affect technical/engineering colleges and universities, and the “developmental” VR includes spending on advanced, but as yet non-commercial applications, along with pure science and research systems not included in the other categories.

Industrial and Scientific Design

Applications of design and development VR market are in engineering, architecture and chemical design and development a constant shift will bring performance of CAD/ CAMM application to the standards of Virtual Reality applications . This market will grow from a 1995 market value of $30 million, to $150 million by 2000, reaching an AAGR of 40%. Medical treatment VR market will also sustain growth. The 1995 market value of $20 million is projected to reach $50 million by 2000, reaching a 20% AAGR.

The searching for common standards

Current VR products employ proprietary hardware and software. There is little doubt that incompatibility between different systems is restricting market growth at present. It is probable that as the market matures, certain de facto standards will emerge, perhaps when major players become involved. It is probable that the VR market will follow the route of the real-time financial information markets which found that adopting an open systems approach did not damage sales, as had been feared, but helped encourage the growth of the marketplace. According to the IMO – Information Group at Policy Studies Institute, London (August 95 – VIRTUAL REALITY: THE TECHNOLOGY AND ITS APPLICATIONS), “in the future an open systems approach will emerge for VR as well”. At that point, the market is likely to expand considerably.

However, the cost of VR equipment is falling rapidly. For example, headgear prices have already fallen from hundreds of thousands of dollars to $200 (ECU 169), and basic VR software packages are available commercially for $100 (ECU 85), or can be downloaded from the Internet. Simple VR games software is available in the USA for $70 (ECU 59).

3. VR in Europe

The seminal efforts that gave rise to VR took place in the US. Funding from EC organisations has been slower in coming than in the US, where the Office of Naval Research, National Science Foundation, and Advanced Research Projects Agency now fund VR research and the National Aeronautics and Space Administration has been a long-time developer. This situation is perhaps attributable to the large cost associated with VR until quite recently. However the importance of VR is clearly understood in Europe and progress is now going forward across the entire spectrum of virtual reality, with special emphasis on industrial and commercial applications.

Europe encompasses various countries and cultures, and acceptance of the importance of VR has not been uniform. Interest by British Aerospace, the presence of the parallel processing company Inmos (makers of the Transputer), and early funding by the Department for Trade and Industry are cited by UK researchers as factors that drove research in the UK in the mid-to-late 1980s. This resulted in technology transfer that has produced several successful commercial efforts. More recently, German laboratories and institutions have become active in applying immersion technology to a broad range of applications. France has several of Europe’s leading research institutions for machine vision, robotics, and related technologies that affect VR, but has been less active in developing systems that provide interactive immersion. Most other West European countries have some VR R&D.

In the last two years, the EC organised several events to evaluate VR as a topic for the next research initiative. Recently EC presented one study titled: “Telematics applications of VE – The use of Virtual Environment Techniques in the Application of Telematics to Health Care, Transport, Training and the Disabled and Elderly”. This study was the third activity in a row starting with a workshop in March 1993 in Brussels in which was tried to make some kind of a status report and start the process of gathering recommendations on how to incorporate VR in future EC programmes. The second activity was a small report creating the basis for a larger study, which finally was carried out by a team from Fraunhofer Institute, SEMA Group and MIT.

The “Telematics Application” shows a small section on VE technologies, VE applications (generic use of VE technological capabilities, evaluation of the market) and treats then each of the mentioned fields (Education/Training, Transport, Health Care, and Elderly and Handicapped) and finishes of with potential actions for the TAP programme. In the health area the reports states: “In effect, the objective is to validate the 3-D approaches of VE, and evaluate their benefits for future health care systems. In parallel, other projects aimed at providing basic building blocks for future uses in VE- based medical applications are also of interest. They concern digital and computational models of the human body or critical organs”. The report stresses the use of VE in minimally invasive surgery, surgical decision support and training of surgeons, doctors and students. It also finds a use in evaluation of human interfaces and other factors in the design of critical components of new health care facilities.

EC funded projects/working groups relevant to VREPAR

The European Strategic Program for Research and Development (Esprit II) funded a handful of ongoing VR projects. Glad-in-Art is developing a glove-exoskeleton interface system to manipulate virtual objects, while SCATIS intends to integrate room acoustics into virtual worlds, and Humanoid concentrates on the development and simulation of virtual humans.

The call for proposals for Esprit III did not include a specific VR component. However, VR was explicitly mentioned within the basic research and multimedia components (two of the seven program areas). Between the funded studies we remember FIVE (Framework for Immersive Virtual Environments).

Other VR projects deal with Virtual Environment on Multi-Modal Interfaces (MIAMI and VETIR). VETIR deals with the use of virtual environment technologies in motor disabilities’ rehabilitation technology Initiative for Disabled and Elderly People.

4. Medical Applications of VR

Three important aspects of virtual reality systems offer new possibilities to medical treatment:

  • How They Are Controlled
    Present alternate computer access systems accept only one or at most two modes of input at a time. The computer can be controlled by single modes such as pressing keys on a keyboard, pointing to an on-screen keyboard with a head pointer, or hitting a switch when the computer presents the desired choice, but present computers do not recognize facial expressions, idiosyncratic gestures, or monitor actions from several body parts at a time. Most computer interfaces accept only precise, discrete input. Thus many communicative acts are ignored and the subtleness and richness of the human communicative gesture are lost. This results in slow, energy-intensive computer interfaces. Virtual reality systems open the input channel: the potential is there to monitor movements or actions from any body part or many body parts at the same time. All properties of the movement can be captured, not just contact of a body part with an effector.
    Given that these actions are monitored, why can the user control more in the virtual world than in the real world? In the virtual environment these actions or signals can be processed in a number of ways. They can be translated into other actions that have more effect on the world being controlled, for example, virtual objects could be pushed by blowing, pulled by sipping, and grasped by jaw closure. Proportional properties such as force, direction, and speed could become interchangeable allowing the person with arthritic joints to push something harder, without the associated pain, by simply moving faster. They could be filtered to achieve a cleaner signal. Actions can be amplified thus movement of the index finger could guide a tennis racket. Alternately movements could be attenuated giving the individual with large, poorly controlled movement more precise control of finer actions.
  • Feedback
    Because VR systems display feedback in multiple modes, feedback and prompts can be translated into alternate senses for users with sensory impairments. The environment could be reduced in size to get the larger or overall perspective (without the “looking through a straw effect” usually experienced when using screen readers or tactile displays). Objects and people could show speech bubbles for the person who is deaf. Sounds could be translated into vibrations or into a register that is easier to pick up. Environmental noises can be selectively filtered out. The user with a spinal cord injury with no sensation in her hands could receive force and density feedback at the shoulder, neck, or head.
    For the individual multimodal feedback ensures that the visual channel is not overloaded. Vision is the primary feedback channel of present-day computers; frequently the message is further distorted and alienated by representation through text. It is very difficult to represent force, resistance, density, temperature, pitch, etc., through vision alone. Virtual reality presents information in alternate ways and in more than one way. Sensory redundancy promotes learning and integration of concepts.
  • What Is Controlled
    The final advantage is what is controlled. Until the last decade computers were used to control numbers and text by entering numbers and text using a keyboard. Recent direct manipulation interfaces have allowed the manipulation of iconic representations of text files or two dimensional graphic representations of objects through pointing devices such as mice (Brownlow, 1989). The objective of direct manipulation environments was to provide an interface that more directly mimics the manipulation of objects in the real world. The latest step in that trend, virtual reality systems, allows the manipulation of multisensory representations of entire environments by natural actions and gestures. This last step may make accessible valuable experiences missed due to physical or sensory impairments. These experiences may include early object-centered play, and early independent mobility.
    In virtual environments we can simulate inaccessible or risky experiences, allowing the user to extract the lessons to be learned without the inherent risk. Virtual reality systems can allow users to extend their world knowledge.

According to an assessment on current diffusion of VR in the medical sector, gathered by the Gartner Group, forecast of VR future in this area are quite promising. Within the medical application its strategic relevance will increase and gain importance. It is envisaged that by year 2000 despite possible technological barriers, virtual reality techniques will be integrated in endoscopic surgical procedures. VR will affect also the medical educational strategy for students as well as experienced practitioners, who will increasingly be involved in immersive simulated techniques. It is expected that these educational routines can become of routine by year 2005.

VR has been until now widely underused, probably because of prohibitive hardware costs, nevertheless this technology is pushing forward new challenges and advances that will materialise by year 2000. The medical use of VR will take place mainly in four domains:

  • teaching: VR will reproduce environments or special conditions that will enable to educate medical personnel.
  • simulation: VR will mix video and scanner images to represent and plan surgical intervention, effects of therapy.
  • diagnostics: it will be possible to forecast the effects of complex combinations of healing treatments.
  • therapy: A valuable exploitation of VR in the medical sector is seen with interest in the therapy of psychiatric/psychological disorders such as acrophobia, claustrophobia, nyctophobia, agoraphobia, eating disorders, etc. Therapeutic techniques will include practices that will allow the patients to reproduce and master problem environments.

For a more detailed description of the use of VR in health care you can read the paper: VR in Health Care: A Survey

5. Issues to be solved

Although the technology is mature enough to have different applications, there are key issues to be resolved for its use for practical applications.

  • costs: The product seem to be “a solution in search of a problem”. As with early computer graphics products, the entry-level costs are relatively prohibitive. A complete VR environment, including workstations, goggles, body suits, and software, is in the range of KEcu 70.000 to KEcu 1.000.000.
  • lack of standard and reference parameters: The hyperbole and sensational press coverage associated with some of these technologies have led many potential users to overestimate the actual capabilities of existing systems. Many of them must actually develop the technology significantly for their specific tasks. Unless their expertise includes knowledge of the human-machine interface requirements for their application, their resulting product will rarely get beyond a “conceptual demo” that lacks practical utility.
  • human factors: The premise of VE seems to be to enhance the interaction between people and their systems. It thus becomes very important to understand how people perceive and interpret events in their environments, both in and out of virtual representation of reality. We must address issues of human performance to understand how to develop and implement VE technology that people can use comfortably and effectively. Fundamental questions remain about how people interact with the systems, how they may be used to enhance and augment cognitive performance in such environments, and how they can best be employed for instruction, training, and other people oriented applications.

6. Conclusion

The marketing situation of VR is very fluid, this means that the technology while being ready for professional applications is not at the stage of settling definite standards and definite reference points in all perspectives, including possible leading manufacturers, compatibility specifications, performance levels, economical costs and human expertise. So standing the situation it is heavily characterised by uncertainty.

This uncertainty should not be confused with lack of confidence on the promising outcomes of the technology, but instead with the rapid mutation and evolution that characterises all information technology markets. For what concerns the project these reflections sound as warning in the adoption of solutions that need to be considered as a short term answer to a contingent problem. A special concern must be raised to a continuos chase of the last up to date technological product release.

In the general aim of the project we take advantage of the capillary diffusion of the PC based technology and to the best associated hardware and software devices available that can ensure both reliability and availability in different domains independently of the different constraints posed by geographical location.

کودا – CUDA

کودا به انگلیسی (CUDA) که مخفف عبارت انگلیسی Compute Unified Device Architecture است یک سکوی پردازش موازی و مدل برنامه‌نویسی است که توسط شرکت انویدیا به‌وجود آمده است و در واحدهای پردازش گرافیکی این شرکت پشتیبانی می‌شود.کودا به توسعه دهنده گان نرم‎افزار اجازه می‎دهد تا از یک GPU که ویژگی CUDA-enabled دارد برای هدف پردازش استفاده کنند، رویکردی که GPGUG شناخته می‎شود. کودا به توسعه‌دهنده گان امکان دسترسی مستقیم به حافظه و مجموعه دستورالعمل در واحد پردازش گرافیکی را می‌دهد.

سکوی کودا برای کار با زبان‎های برنامه‎نویسی مانند C و ++C و فرترن طراحی شده‎است.این دسترسی باعث می‎شود تا برای متخصصان استفاده از منابع GPU آسان‎تر شود برخلاف راه کار های API دیگر چون DIRECT3D و OpenGL که نیاز به توانایی حرفه ای در برنامه نویسی گرافیک داشتند.همچین کودا از چارچوب‎هایی چون OpenACC و OpenCL پشتیبانی می کند.

پیش زمینه

GPU به عنوان یک پردازنده خاص ،درخواست‎های های بلادرنگ با کیفیت بالا گرافیک سه بعدی که از نظر وظایف محاسباتی فشرده هستند را مختصات‎دهی می‎کند.از سال 2012 میلادی GPU ها به سیستم‎های چند هسته ای قدرتمندی ارتقا یافتند که قادر به دستکاری بلوک‎های بزرگی از داده ها هستند.این طراحی بسیار از هدف عامه CPU ها برای الگوریتم‎ها در مواقعی که پردازش موازی روی بلوک های داده انجام می‎شود موثرتر است.به عنوان مثال:

  • الگوریتم ارسال برچسب
  • الگوریتم مرتب سازی سریع روی لیست‎های ‎بزرگ
  • تبدیل موجک سریع دوبعدی
  • شبیه‎سازی دینامیک مولکولی

قابلیت‎های برنامه‌نویسی

کودا توسط کتابخانه‎های مجهز شده کودا ،دستوردهنده کامپایلر مانند OpenACC و همین طور توسعه‎هایی استاندارد صنعتی از زبان‎هایی شامل C، ++C و فرترن برای توسعه‎دهندگان قابل دسترسی است.برنامه‎نویسان C++/C از ‘++CUDA C/C’ استفاده می کنند که کامپایل شده با “nvcc” است.nvcc یک کامپایلر C++/C بر پایه LLVM شرکت انویدیا است.برنامه نویسان فرترن نیز می توانند از ‘CUDA Fortran’ استفاده کنند که کامپایل شده با PGI CUDA Fortran Complier شرکت The Portland Group است. علاوه بر کتابخانه‎ها ،دستوردهنده‎های کامپایلر و ++CUDA C/C و CUDA Fortran ،سکو کودا از سایر رابط‎های محاسباتی شامل موارد زیر پشتیبانی می کند.

  • OpenCL گروه Khronos
  • DirectCompute مایکروسافت
  • محاسبات سایه زنی OpenGL
  • C++ AMP

همچنین لفافه سوم شخص (Third party wrappers) برای زبان هایی مانند پرل (Perl)،پایتون (Python)،آر (R) ،فرترن (FORTRAN)،جاوا (Java)،روبی (Ruby)،هسکل (Haskell)،متلب (Haskell) ،آی دی ال (IDL)،لوآ (Lua) و نیز به طور پیشفرض متمتیکا (Mathematica) در دسترس هستند.

در صنعت بازی‎های کامپیوتری ،GPUها تنها برای رندر کردن گرافیک نیست بلکه در محاسبات فیزیکی بازی (اثرات فیزیکی شبیه دود ،آتش ،ترشحات و آوار) نیز هستند.مثال‎هایی نظیر فیز-اکس و گلوله شامل این مورد هستند.کودا همچنین برای کاربردهای شتاب‎دهی غیرگرافیکی در زیست‎شناسی محاسباتی ،رمزنگاری و حوزه های دیگر نیز استفاده می‎شود.

کودا هم یک API سطح پایین و هم یک API سطح بالا فراهم می کند.SDK اولیه کودا در 15 فوریه 2007 برای ویندوز مایکرو‎سافت و لینوکس انتشار عمومی شد.پشتیبانی در سیستم‎عامل مک در نسخه دوم اضافه شد که جای نسخه تست 14 فوریه 2008 را می‎گیرد.کودا با تمامی ‎GPUهای از سری G8x به بعد شامل جی‎فورس ،کوادرو و تسلا(گرافیک) کار می‎کند.کودا با بیشتر سیستم‎عامل‎‎های استاندارد کار می‎کند.انویدیا می‎گوید برنامه‎هایی که برای سری G8x توسعه‎یافته‎اند همچنین بدون تغییر روی نسل‎های آینده کارت‎های گرافیک بسته به سازگاری دودویی کارخواهند کرد.


کودا چندین برتری در برابر محاسبات عمومی سنتی روی GPU ها(در کل منظورGPGPU) دارد که از واسط‎های گرافیکی استفاده می‎کنند.

  • خواندن پراکنده یعنی کد می‎تواند از آدرس‎های دلخواه در حافظه بخواند.
  • حافظه مجازی یکپارچه (کودا نسخه 4.0 به بعد)
  • حافظه یکپارچه(کودا نسخه 6.0 به بعد)
  • حافظه مشترک کودا ناحیه ای که یک حافظه سریع مشترک است ،نشان می‎دهد که می‎تواند میان نخ‎ها به اشتراک گذاشته‎شود.این حافظه می‎تواند به عنوان یک حافظه نهان مدیریت شده تحت دسترسی کاربر استفاده شود و پهنای باند بیشتری داریم یعنی امکان استفاده را از جستجو بافتی.
  • دانلود‎های سریع تر و مجدد خوانی
  • پشتیبانی کامل برای اعداد صحیح و عملیات بیتی شامل جستجوی بافتی صحیح

5 tricks for working faster in Google Drive

Send files directly to Drive, create new documents with one click, and more.

5 tricks for working faster in Google Drive

5 tricks for working faster in Google Drive

Create a Drive bookmark

Google Chrome was designed to give you easy access to Drive. But if Firefox is your preferred browser, you can create your own shortcut to Drive and its contents.

With Drive open in your browser, create a bookmark. Then right-click on that bookmark and select Properties. Enter Drive in the keyword field. Now when you want to access Drive, just type Drive in Firefox’s address bar, and it will open.

Follow the same steps to create shortcuts to any files in your Drive account.

Find shared documents by collaborator

Google Drive makes collaboration nearly effortless. So, it’s likely you’ve accumulated a healthy collection of shared documents. That can make it difficult to find the one you need even when using the Shared with Me link in Drive’s left sidebar.

You can search for collaborators by name in Drive.

You can search for collaborators by name in Drive.


To narrow the list of shared documents to a particular collaborator, type their name in the search bar at the top. This will thin the choices just to docs you worked on together.

Add Drive to Windows’ “Send to” menu

If you’ve already installed Google Drive on Windows, you can enable this useful shortcut. Navigate to Users > [yourusername] > AppData > Roaming > Microsoft > Windows > SendTo. Find Google Drive on the Favorites bar and drag it to the SendTo folder. This will let you right-click on any file in Windows and express it directly to Drive.

Preview multiple documents

There’s nothing efficient about opening a bunch of individual documents to find the one you want. Fortunately, in Drive you don’t have to.

Use Drive’s preview feature to toggle through a range of files without opening them all.

Use Drive’s preview feature to toggle through a range of files without opening them all.


Start by either Shift-clicking (for a continuous range of files) or Control-clicking (for a non-continuous range) the documents you want to preview. Next, click the eye icon in the top right of the browser window. Thumbnails of each file will appear in a preview bar across the bottom of the browser window. Toggle through them to sneak a full-size peek at each one.

Use quick creation links

Rather than opening a new browser tab and logging in to Drive each time you want to create a new document or spreadsheet, shave off some time by using quick creation links. These links are written as “” but you replace “document” with “presentation,” “spreadsheet,” and “drawing” for each link. Then drag all of them to your bookmark toolbar. Next time you need to create one of these documents, you can do it with one click.

GPU Accelerated Computing with C and C++

With the CUDA Toolkit from NVIDIA, you can accelerate your C or C++ code by moving the computationally intensive portions of your code to an NVIDIA GPU.  In addition to providing drop-in library acceleration, you are able to efficiently access the massive parallel power of a GPU with a few new syntactic elements and calling functions from the CUDA Runtime API.

The CUDA Toolkit from NVIDIA is free and includes:

  • Visual and command-line debugger
  • Visual and command-line GPU profiler
  • Many GPU optimized libraries
  • The CUDA C/C++ compiler
  • GPU management tools
  • Lots of other features

Getting Started:

  1. Make sure you have an understanding of what CUDA is.
    • Read through the Introduction to CUDA C/C++ series on Mark Harris’ Parallel Forall blog.
  2. Try CUDA by taking a self-paced lab on These labs only require a supported web browser and a network that allows Web Sockets. Click here to verify that your network & system support Web Sockets in section “Web Sockets (Port 80)”, all check marks should be green.
  3. Download and install the CUDA Toolkit.
    • You can watch a quick how-to video for Windows showing this process:

    • Also see Getting Started Guides for Windows, Mac, and Linux.
  4. See how to quickly write your first CUDA C program by watching the following video:

Learning CUDA:

  1. Take the easily digestible, high-quality, and free Udacity Intro to Parallel Programming course which uses CUDA as the parallel programming platform of choice.
  2. Visit for CUDA C/C++ documentation.
  3. Work through hands-on examples:
  4. Look through the code samples that come installed with the CUDA Toolkit.
  5. If you are working in C++, you should definitely check out the Thrust parallel template library.
  6. Browse and ask questions on or NVIDIA’s DevTalk forum.
  7. Learn more by:
  8. Look at the following for more advanced hands-on examples:

So, now you’re ready to deploy your application?
You can register today to have FREE access to NVIDIA TESLA K40 GPUs.
Develop your codes on the fastest accelerator in the world. Try a Tesla K40 GPU and accelerate your development.


The CUDA Toolkit is a free download from NVIDIA and is supported on Windows, Mac, and most standard Linux distributions.

  • Starting with CUDA 5.5, CUDA also supports the ARM architecture
  • For the host-side code in your application, the nvcc compiler will use your default host compiler.

Popular Pages
  • Shangul Mangul Habeangur,3d Game,AI,Ahmadreza razian,boz,boz boze ghandi,شنگول منگول حبه انگور,بازی آموزشی کودکان,آموزش شهروندی,آموزش ترافیک,آموزش بازیافت Shangul Mangul HabeAngur Shangul Mangul HabeAngur (City of Goats) is a game for child (4-8 years). they learn how be useful in the city and respect to people. Persian n...
  • Drowning Detection by Image Processing-Featured Drowning Detection by Image Processing In this research, I design an algorithm for image processing of a swimmer in a pool. This algorithm diagnostics the swimmer status. Every time graph s...
  • CV Resume Ahmadrezar Razian-سید احمدرضا رضیان-رزومه Resume Full name Sayed Ahmadreza Razian Age 38 (Sep 1982) Website  Email Education MS...
  • Tianchi-The Purchase and Redemption Forecasts-Big Data-Featured Tianchi-The Purchase and Redemption Forecasts 2015 Special Prize – Tianchi Golden Competition (2015)  “The Purchase and Redemption Forecasts” in Big data (Alibaba Group) Among 4868 teams. Introd...
  • CV Resume Ahmadrezar Razian-سید احمدرضا رضیان-رزومه معرفی نام و نام خانوادگی سید احمدرضا رضیان پست الکترونیکی درجات علمی کارشناسی : ریاضی کاربردی – دانشگاه اصفهان (معدل 14...
  • Nokte feature image Nokte – نکته نرم افزار کاربردی نکته نسخه 1.0.8 (رایگان) نرم افزار نکته جهت یادداشت برداری سریع در میزکار ویندوز با قابلیت ذخیره سازی خودکار با پنل ساده و کم ح...
  • 1st National Conference on Computer Games-Challenges and Opportunities 2016-Featured 1st National Conference on Computer Games-Challenges and Opportunities 2016 According to the public relations and information center of the presidency vice presidency for science and technology affairs, the University of Isfah...
  • Brick and Mortar Store Recommendation with Budget Constraints-Featured Tianchi-Brick and Mortar Store Recommendation with Budget Constraints Ranked 5th – Tianchi Competition (2016) “Brick and Mortar Store Recommendation with Budget Constraints” (IJCAI Socinf 2016-New York,USA)(Alibaba Group...
  • GPU vs CPU Featured CUDA Optimizing raytracing algorithm using CUDA Abstract Now, there are many codes to generate images using raytracing algorithm, which can run on CPU or GPU in single or multi-thread methods. In t...
  • 2nd Symposium on psychological disorders in children and adolescents 2016 2nd Symposium on psychological disorders in children and adolescents 2016 2nd Symposium on psychological disorders in children and adolescents 2016 Faculty of Nursing and Midwifery – University of Isfahan – 2 Aug 2016 - Ass...
  • MyCity-Featured My City This game is a city simulation in 3d view. Gamer must progress the city and create building for people. This game is simular the Simcity.
  • ببین و بپر - Watching Jumping ببین و بپر به زودی.... لینک صفحه :
  • SVMReview,Support Vector Machine SVM Review On this review, i compare 4 papers about 4 famous models by SVM. These models are : Maximum Likelihood Classification (ML) Backpropagatio...
  • ببین و بپر - Watching Jumping Watching Jumping Coming Soon...   Visit at :
  • 2nd Symposium on psychological disorders in children and adolescents 2016-Insulin injections Educational software “Kudak-e Tavana” And Oculus Rift Development Kit 2. Environmental Education Software In this game , Kids learn that They must respect to Nature and the Environment. This game was created in 3d . 600x420 (0x0) 66.45 KB ...
Popular posts

About me

My name is Sayed Ahmadreza Razian and I am a graduate of the master degree in Artificial intelligence .
Click here to CV Resume page

Related topics such as programming, image processing, machine vision, virtual reality, machine learning, data mining, and math are my research interests.

جهت نمایش صفحه معرفی و رزومه کلیک کنید
x (x)
My Scientific expertise
  • Image processing
  • Machine vision
  • Machine learning
  • Pattern recognition
  • Data mining - Big Data
  • CUDA Programming
  • Game and Virtual reality

Download Nokte as Free

Coming Soon....

Greatest hits

One day you will wake up and there won’t be any more time to do the things you’ve always wanted. Do it now.

Paulo Coelho

Anyone who has never made a mistake has never tried anything new.

Albert Einstein

You are what you believe yourself to be.

Paulo Coelho

The fear of death is the most unjustified of all fears, for there’s no risk of accident for someone who’s dead.

Albert Einstein

It’s the possibility of having a dream come true that makes life interesting.

Paulo Coelho

Waiting hurts. Forgetting hurts. But not knowing which decision to take can sometimes be the most painful.

Paulo Coelho

Imagination is more important than knowledge.

Albert Einstein

Gravitation is not responsible for people falling in love.

Albert Einstein

Site by images
Recent News Posts