Programming Interview Test

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Programmer test: Sphere Data Viewer

Internal Hoplon S.A. document

Problem description:

In order to visualize a 3d sphere dataset in real-time, a CPU only solution should be


implemented. Each sphere in the dataset is defined by position, radius and colour. A file
containing this dataset should be provided with the test. A viewer that meets the
following definition should be created:
The image should be rendered to a 1024x1024@32bit buffer.
It can be assumed that the dataset is static and cannot be changed in run-time.
The spheres should be rendered using perspective projection.
The spheres should be rendered using some HSR (hidden surface removal)
algorithm.
Simple shading (diffuse and specular) from a directional light source is sufficient.
Theres no need for shadows.
The spheres should spin in front of the camera.
Only the given sphere dataset in its entirety should be used for the assignment.

A framework with the initial implementation is provided with the test. The viewer should
be created on top of that framework following those guidelines:
Add the missing viewer functionality
Make sure that the dataset is rendered efficiently
Aim for performance, youll be measured both by the visual output and speed
results.
Inner loop performance optimization (low level optimization, SSE, etc..)
Multi-threaded processing of the data.
Stable results when the elements touch the view borders
Explain why you made certain design decisions
Comment the code to the degree that you feel is necessary
Write clean and readable code. (use tab size 2)
Implement the system with the appropriate data structures. High level libraries
such as STL or Boost can be used.

As an option, a good looking (free style) version of the viewer can be provided as well. In
this version only the rendering quality and visual output will be measured. If you do
choose to do it, please make sure that youll are able to provide the source code and the
executable for both of those versions.

Expected environment: Windows, you can assume PC Pentium4 (or similar AMD), C++

Please send back the source code with executable within 1 week.

You might also like