AndroidRobot 4.0 User Manual

Abstract

[Thumbnail which links to a demo image] AndroidRobot is a library module from the Persistence of Vision Ray Tracer (POV-Ray) Object Collection that defines a 3-D model of Google’s Android™ robot, with posable head and limbs.


Table of Contents


Overview

Downloaded Files

The italicized nnnnnn in some of the file names represents the 6-digit number that is in the name of the .zip file.

Key Files
File Description
androidrobot.html The user manual (this document)
androidrobot.inc The AndroidRobot software
androidrobot.pov
androidrobot_posed.pov
Scene description files demonstrating use of AndroidRobot
androidrobot.jpg
androidrobot_posed.jpg
androidrobot_thumbnail.png
Sample output images
Administrative Files
File Description
READMEnnnnnn.html Important information about using the POV-Ray Object Collection

Caveat: This README file contains the text: “You may use images that you generate using these files without restriction.” For the AndroidRobot module, the Google license overrides this README clause. Google Inc. retains all trademark rights to the Android robot.

androidrobot_description.txt A brief description of AndroidRobot
androidrobot_keywords.txt A list of keywords
androidrobot_prereqs.txt Prerequisites (empty file)
androidrobot.css Other administrative files
cc-LGPL-a.png
Versionnnnnnn.js

Note for users of older versions of AndroidRobot: Files androidrobot_cc-lgpl.png and droid.pov are no longer used, and androidrobot.png has been replaced with androidrobot.jpg.

Table of contents


Prerequisites

AndroidRobot requires POV-Ray version 3.5 or later.

Namespace Compliance

All file names in this module and all global and local identifiers defined in androidrobot.inc comply fully with the Object Collection naming standards, as revised August 2008 and proposed August 2012. The reserved prefixes for this module are “AndroidRobot” and “Droid,” including any uppercase and lowercase variants. To avoid conflicts, do not introduce into your scene description file any identifiers with these names, or any identifiers that start with these names plus an underscore.

Usage

  1. If you are using POV-Ray 3.7 or later, you must set assumed_gamma in global_settings{} prior to the next step, or you will get a parse error.
  2. Include this file once prior to using any of the macros:
    #include "androidrobot.inc"
    Including the file more than once is harmless, though unnecessary.

Table of contents


Macros

AndroidRobot (Use_merge)

Creates an untextured robot. The robot faces the x-direction and the bottom of the robot is at ANDROIDROBOT_V_BASE.

Argument

Formal Parameter Type Description
Use_merge float/Boolean If yes, the robot will be composed using CSG merge. If no, then CSG union will be used. In general, pass yes if the robot is to be transparent, no otherwise.

Table of contents


AndroidRobot_Eye_radius ()

Returns the radius (float) of the eyes’ cylindrical sockets.

Table of contents


AndroidRobot_Eye_v ()

Returns the point (vector) where the central axis of the left eye’s cylindrical socket intersects the dome of the head.

Table of contents


AndroidRobot_Head (Outset)

Returns the dome on which the robot’s head is based. This is useful for developing eyes or other facial features.

Argument

Formal Parameter Type Description
Outset float An amount by which the dome is larger or smaller than the head. Zero returns a dome the same size as the head, a positive number returns a larger dome, and a negative number returns a smaller dome.

Table of contents


AndroidRobot_Head_x (x_Head)

Returns a transformation that is suitable for facial features. Apply this macro to facial features if you have applied a transformation to the robot’s head with macro AndroidRobot_Posed(). (Do not apply the head’s transformation directly to the facial features, as this will not work properly for some transformations.)

Argument

Formal Parameter Type Description
x_Head transformation The transformation to be applied to the facial features. Typically, this should be the same as the x_Head argument passed to AndroidRobot_Posed().

Example

union
{ AndroidRobot_Posed
  ( no, MyHeadRotation,
    transform{}, transform{}, transform{}, transform{}
  )
  union
  { object { UserDefinedEye translate AndroidRobot_Eye_v() }
    object { UserDefinedEye translate AndroidRobot_Eye_v() * <1, 1, -1> }
    // transform { MyHeadRotation } // Wrong!
    AndroidRobot_Head_x (MyHeadRotation) // Correct
  }
  pigment { ANDROIDROBOT_C_COLOR }
}

See the demo scene file androidrobot_posed.pov for a complete example.

Table of contents


AndroidRobot_Posed (Use_merge, x_Head, x_Left_arm, x_Right_arm, x_Left_leg, x_Right_leg)

Creates an untextured posable robot. [Image of posed robot] See the demo scene file androidrobot_posed.pov for an example of how to use this.

For backward compatibility, AndroidRobot_posed() is also accepted.

Arguments

Formal Parameter Type Description
Use_merge float/Boolean If yes, the robot will be composed using CSG merge. If no, then CSG union will be used. In general, pass yes if the robot is to be transparent, no otherwise.
x_Head transformation The transformation to be applied to the head. The origin is at the neck.
x_Left_arm transformation The transformation to be applied to the left arm. The origin is at the shoulder.
x_Right_arm transformation The transformation to be applied to the right arm. The origin is at the shoulder.
x_Left_leg transformation The transformation to be applied to the left leg. The origin is at the hip.
x_Right_leg transformation The transformation to be applied to the right leg. The origin is at the hip.

Table of contents


AndroidRobot_Set_color (Version)

Sets the values of the Android Web color variables ANDROIDROBOT_C_COLOR and ANDROIDROBOT_C_RAWCOLOR. Google has changed the official color, and this macro allows you to revert to the previous color.

Argument

Formal Parameter Type Description
Version float
Value 4.0
The gamma-adjusted color is #78C257, and the non-adjusted color is rgb <120, 194, 87> / 255.
Values less than 4
The gamma-adjusted color is #A4C639, and the non-adjusted color is rgb <164, 198, 57> / 255.

Table of contents


Other Identifiers

Global Parameter

This parameter may be #declared by the user prior to using the macros.

Parameter Type Description Default
AndroidRobot_Version float A backwards compatibility setting to select the modeling of the robot according to the version of AndroidRobot:
Values 1.0 – 2.1
The original model, which had the arms flush against the torso.
Value 2.2
Like the original model, except the arms are slightly separated from the torso.
Value 3.0
A model based on the source code of an SVG image.
Value 4.0
Like 3.0, but with an updated official Web color.
4.0

Table of contents


Reference Identifiers

Identifier Type Description Value
ANDROIDROBOT_C_COLOR color The gamma-adjusted official Android Web color. Use this if:
  • you have set global_settings { assumed_gamma 1 } or
  • you are using POV-Ray 3.7 or later (whatever your assumed_gamma setting).

Warning: If you are using POV-Ray 3.62 or older, the gamma adjustment will be incorrect if assumed_gamma is set to any value other than 1.

#78C257 *
ANDROIDROBOT_C_RAWCOLOR color The official Android Web color, without gamma adjustment. Use this if:
  • you have set global_settings { assumed_gamma 2.2 };
  • you have set global_settings { assumed_gamma srgb }; or
  • you are using POV-Ray 3.62 or older and have not set assumed_gamma.
rgb <120, 194, 87> / 255 *
ANDROIDROBOT_HEIGHT float The height of the unposed robot, not including the antennae. 1.65
ANDROIDROBOT_V_BASE 3-D vector The location of the bottom of the unposed robot. <0, -0.55, 0>

* This value may be changed with macro AndroidRobot_Set_color().

Table of contents


Short Form Identifiers

The short prefix from AndroidRobot 1.0 has been reinstated in version 4.0. The following table lists the identifiers that have short form alternatives.

Long Form Short Form
AndroidRobot Droid
ANDROIDROBOT_C_COLOR DROID_C_COLOR
ANDROIDROBOT_C_RAWCOLOR DROID_C_RAWCOLOR
AndroidRobot_Eye_radius Droid_Eye_radius
AndroidRobot_Eye_v Droid_Eye_v
AndroidRobot_Head Droid_Head
AndroidRobot_Head_x Droid_Head_x
ANDROIDROBOT_HEIGHT DROID_HEIGHT
AndroidRobot_Posed Droid_Posed
AndroidRobot_Set_color Droid_Set_color
ANDROIDROBOT_V_BASE DROID_V_BASE

The following identifier has no short form:

Table of contents


Internal Identifiers

Any identifiers in androidrobot.inc that are not documented in this manual are considered “private” or “protected,” and are subject to change or elimination in a future update.

Table of contents


About AndroidRobot

The SDL code is copyright © 2009 Karl Ostmo and © 2011 – 2018 Richard Callwood III. Some rights reserved. Licensed under the Creative Commons-GNU Lesser General Public License.
Android is a trademark of Google Inc. The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Object Collection Categories

Change Log

Version Date Notes
1.0 2009 October 30
  • The software is created by Karl Ostmo.
2.0 2011 July 23
  • The module is made namespace compliant.
  • To facilitate modularization, the code is separated into an include file and a demo scene.
  • In the process, the pigment is removed from the robot model, and the official color declared separately.
  • The position of the base of the robot is declared.
  • The robot is made posable, and an additional demo scene is added to illustrate this capability.
  • The modeling, position, height, and orientation of the robot are left unchanged.
2.1 2012 June 26
  • The non-gamma-adjusted official color is added.
  • The demo files are set to POV-Ray 3.5.
2.1a 2012 June 28
  • A correction is made to the Google license statement.
2.2 2014 October 5
  • The arms are moved away from the torso, as they appear in the 2-D logo.
  • The Google license statement is upgraded.
3.0 2015 April 25
  • The robot is remodeled based on an SVG source. The position, height, and orientation of the robot are left unchanged.
  • The height of the robot is declared.
  • Tools are added to facilitate user modeling of eyes.
3.0a 2015 April 27
  • A correction is made to the user manual.
4.0 2018 September 23
  • The short prefix is reinstated.
  • The official Android Web color is updated.

Possible Future Development

Google has published a new SVG image since AndroidRobot 3.0a was released. The new image appears the same except for the color and the lack of a white border; and since this file is much harder to examine than the file posted to Wikimedia, I have postponed a detailed comparison. If future examination reveals significant differences, this module will be updated based on the new file.

See Also

Table of contents