// // time: Wed May 1 14:59:18 1996 // // version: 3.0.0 (format), 3.1.0 (DX) // // // Begin MDF // MODULE TranslateToOrigin // CATEGORY Macros // DESCRIPTION translates object to origin for rotation about center // INPUT Object_to_Translate; field; (none); Object that you want to center at the origin (ie... for rotation about the object center // OUTPUT translated_object; object; Object translated to the origin // End MDF // // comment: This simple macro translates an object to the origin, so that if you use Rotate, the object will rotate about its center. // comment: // comment: (C) COPYRIGHT International Business Machines Corp. 1996. // comment: All Rights Reserved. // comment: Licensed Materials - Property of IBM // comment: // comment: Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of IBM not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. // comment: // comment: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THE SOFTWARE, BOTH INDIVIDUALLY AND AS ONE OR MORE GROUPS, "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IBM DOES NOT WARRANT AGAINST THE INFRINGMENT OF PATENTS, COPYRIGHT OR ANY OTHER INTELLECTUAL PROPERTY RIGHTS OF OTHERS. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE, BOTH INDIVIDUALLY AND AS ONE OR MORE GROUPS, IS WITH YOU.he rotation will always be about the center of the object. // workspace: width = 244, height = 617 // layout: snap = 0, width = 50, height = 50, align = UL // macro TranslateToOrigin( Object_to_Translate ) -> ( translated_object ) { // // node Input[5]: x = 112, y = 79, inputs = 0, label = Input // parameter: position = 1, name = 'Object_to_Translate', value = ' ', descriptive = 0, description = 'Object that you want to center at the origin (ie... for rotation about the object center', required = 1, visible = 1 // TranslateToOrigin_Input_5_out_1 = Object_to_Translate; // // node ShowBox[1]: x = 140, y = 211, inputs = 1, label = ShowBox // TranslateToOrigin_ShowBox_1_out_1, TranslateToOrigin_ShowBox_1_out_2 = ShowBox( TranslateToOrigin_Input_5_out_1 ) [instance: 1, cache: 1]; // // node Compute[25]: x = 170, y = 340, inputs = 3, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "-$0" // expression: value = -a // name[2]: value = a // name[3]: value = b // TranslateToOrigin_Compute_25_out_1 = Compute( "-$0", TranslateToOrigin_ShowBox_1_out_2, NULL ) [instance: 25, cache: 1]; // // node Translate[1]: x = 173, y = 449, inputs = 2, label = Translate // TranslateToOrigin_Translate_1_out_1 = Translate( TranslateToOrigin_Input_5_out_1, TranslateToOrigin_Compute_25_out_1 ) [instance: 1, cache: 1]; // // node Output[4]: x = 184, y = 554, inputs = 1, label = Output // parameter: position = 1, name = 'translated_object', value = ' ', descriptive = 0, description = 'Object translated to the origin ', required = 0, visible = 1 // translated_object = TranslateToOrigin_Translate_1_out_1; // network: end of macro body } TranslateToOrigin_Input_5_out_1 = NULL; TranslateToOrigin_ShowBox_1_out_2 = NULL; TranslateToOrigin_Compute_25_out_1 = NULL; TranslateToOrigin_Translate_1_out_1 = NULL;