[ Prev | Index | Next ]
Japanese English

Walking Coordinate Systems

This section introduces the concept of walking a coordinate system. In this context, "walking" refers to a type of movement -- but unlike standard movement based on the parent coordinate system's axes, walking is movement based on the coordinate system's own axes.

Note: "Walking Coordinate Systems" is a term specific to VCSSL and is not a general term in mainstream 3DCG terminology.

Walking a Coordinate System

To walk a coordinate system, use the walkCoordinate(...) function.

- Function Format -

int walkCoordinate (
  int coordinateID,
  float dx, float dy, float dz
)

Arguments:

  • coordinateID: Specifies the ID of the coordinate system to walk.
  • dx, dy, dz: Specify the distances to move in the X, Y, and Z directions, relative to the coordinate system's own axes.

Example Program

Let's walk a local coordinate system placed on top of the world coordinate system. To clearly distinguish the two, we'll place a small axis model on the local coordinate system and a large one on the world coordinate system.

To highlight the difference between walking and standard movement (via moveCoordinate), we'll first rotate the local coordinate system slightly around the Z-axis before walking it.


import graphics3d.Graphics3DFramework;
import Graphics3D;

// Function called at the start of the program
void onStart ( int rendererID ) {

	// (Optional) Set window size and background color
	setWindowSize( 800, 600 );
	setBackgroundColor( 0, 0, 0, 255 );


	// Create a local coordinate system
	int coord = newCoordinate( );

	// Mount the local coordinate system onto the world coordinate system
	mountCoordinate( coord, rendererID );

	// Rotate the local coordinate system slightly around the Z-axis
	rotCoordinateZ( coord, 0.3 );

	// Walk the local coordinate system
	walkCoordinate( coord, 1.0, 0.0, 0.0 );

	// Place a small axis model on the local coordinate system
	int axis1 = newAxisModel( 1.5, 1.5, 1.5 );
	mountModel( axis1, rendererID, coord );

	// Place a large axis model on the world coordinate system
	int axis2 = newAxisModel( 3.0, 3.0, 3.0 );
	mountModel( axis2, rendererID );
}
Sample.vcssl

When you run this program, you'll see two axis models on a black screen: The large one is placed on the world coordinate system, while the small one is placed on the local coordinate system.

The local coordinate system is shown at a position offset by (1.0, 0.0, 0.0) relative to its own axes.

Execution Result
Execution Result
The small one appears slightly shifted in the direction of its own X-axis.



Sponsored Link



Japanese English
Index
[ Prev | Index | Next ]
News From RINEARN
* VCSSL is developed by RINEARN.

English Documentation for Our Software and VCSSL Is Now Nearly Complete
2025-06-30 - We're happy to announce that the large-scale expansion of our English documentation with the support of AI — a project that began two years ago — has now reached its initial target milestone.

VCSSL 3.4.52 Released: Enhanced Integration with External Programs and More
2025-05-25 - This update introduces enhancements to the external program integration features (e.g., for running C-language executables). Several other improvements and fixes are also included. Details inside.

Released: Latest Version of VCSSL with Fixes for Behavioral Changes on Java 24
2025-04-22 - VCSSL 3.4.50 released with a fix for a subtle behavioral change in absolute path resolution on network drives, introduced in Java 24. Details inside.

Released the Latest Versions of RINEARN Graph and VCSSL - Now Supporting Customizable Tick Positions and Labels!
2024-11-24 - Starting with this update, a new "MANUAL" tick mode is now supported, allowing users to freely specify the positions and labels of ticks on the graph. We'll explain the details and how to use it.

Released Exevalator 2.2: Now Compatible with TypeScript and Usable in Web Browsers
2024-10-22 - The open-source expression evaluation library, Exevalator, has been updated to version 2.2. It now supports TypeScript and can be used for evaluating expressions directly in web browsers. Explains the details.

Behind the Scenes of Creating an Assistant AI (Part 1: Fundamental Knowledge)
2024-10-07 - The first part of a series on how to create an Assistant AI. In this article, we introduce the essential knowledge you need to grasp before building an Assistant AI. What exactly is an LLM-based AI? What is RAG? And more.

Launching an Assistant AI to Support Software Usage!
2024-09-20 - We've launched an Assistant AI that answers questions about how to use RINEARN software and helps with certain tasks. Anyone with a ChatGPT account can use it for free. We'll explain how to use it.

Software Updates: Command Expansion in RINEARN Graph, and English Support in VCSSL
2024-02-05 - We updated our apps. This updates include "Enhancing the Command-Line Features of RINEARN Graph" and "Adding English Support to VCSSL." Dives into each of them!