| canvas diameter angle nucleous epicycle |
"Crea un círculo de tamaño fijo y color aleatorio"
canvas := TRCanvas new.
"nucleous"
nucleous := TREllipseShape new.
diameter := 200. "This sould be variable, representing time."
nucleous size: diameter.
nucleous color: Color lightGreen.
canvas addShape: nucleous.
"epicycle"
epicycle := TREllipseShape new.
"The following two values should be computed dynamically. Just testing them for aesthetical reasons"
angle := ( 360 atRandom asFloat ) * 3.141592/180 .
epicycle size: 35.
epicycle color: Color lightRed.
epicycle translateTo: (( ( diameter / 2 ) * ( angle cos )) @ (( diameter / 2 ) * ( angle sin )) ).
canvas addShape: epicycle.
"Showing the end result"
canvas .
THIS SOFTWARE SERVICE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHOR OR SERVICE PROVIDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE SERVICE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE SERVICE.