locked
How can I DRAW this sphere: RRS feed

  • Question

  • Hi Folks !

    I would like to draw exactly this:

    in small basic.

    Which statement should i use ?

    Shapes.AddEllipse ( to draw the circle ) then fill with red color

    and to do the gradient of light ?

    LDShapes.BrushEllipse

    but i don't want to do the shadow under the sphere.

    I'm going for the next couple of Months, a big project in Small Basic.

    Thanks for your help.:)

    Thursday, May 12, 2016 10:08 PM
    Answerer

Answers

  • So you want it as a Shape ?!

    The cheapest way is ID: RXH939 and for further use, ... the shape is in 'shpEll'.


    PS: Or ID: RXH939-0   ' to get it as Image (in img/img2) or as PixelArray (arrPxl)
    Friday, May 13, 2016 9:46 AM
    Answerer

All replies

  • Hi Yvan,

    no help, because....

    image_ball_shadow =ImageList.LoadImage("https://social.msdn.microsoft.com/Forums/getfile/862810")
    GraphicsWindow.Title = "pucks on ice"
    GraphicsWindow.top= 0
    GraphicsWindow.left= 0
    GraphicsWindow.Height=700
    GraphicsWindow.Width=700
    GraphicsWindow.BackgroundColor="White"
    
    GraphicsWindow.FontSize = 64
    GraphicsWindow.DrawBoundText(30,100,0,"Canada  :  Germany")
    
    GraphicsWindow.DrawresizedImage(image_ball_shadow,10,250,100,125)
    GraphicsWindow.DrawresizedImage(image_ball_shadow,60,310,100,125)
    GraphicsWindow.DrawresizedImage(image_ball_shadow,110,370,100,125)
    GraphicsWindow.DrawresizedImage(image_ball_shadow,160,430,100,125)
    GraphicsWindow.DrawresizedImage(image_ball_shadow,210,490,100,125)
        
    GraphicsWindow.DrawresizedImage(image_ball_shadow,410,250,100,125)
    GraphicsWindow.DrawresizedImage(image_ball_shadow,460,310,100,125)
      

    :)

    Thursday, May 12, 2016 11:50 PM
  • So you want it as a Shape ?!

    The cheapest way is ID: RXH939 and for further use, ... the shape is in 'shpEll'.


    PS: Or ID: RXH939-0   ' to get it as Image (in img/img2) or as PixelArray (arrPxl)
    Friday, May 13, 2016 9:46 AM
    Answerer
  • Cool ! thanks !! great solution .

    Friday, May 13, 2016 3:45 PM
    Answerer
  • Great 3d pulsation sphere. ! thanks !!

    very interesting programming: learn a lot with this demo thanks !!!

     'Ellipse Shape
    GraphicsWindow.PenWidth = 0
    shpEll = Shapes.AddEllipse(imgW,imgW)

    ' ... with BrushImage
    LDShapes.BrushShape(shpEll, LDShapes.BrushImage(img))
    LDImage.Remove(img)
    Shapes.Move(shpEll, (GraphicsWindow.Width-imgW)/2, (GraphicsWindow.Height-imgW)/2)

    Friday, May 13, 2016 3:50 PM
    Answerer
  • Can you modify Ray Tracer to get the sphere image?

    https://blogs.msdn.microsoft.com/smallbasic/2014/12/01/raytracer-small-basic-featured-program/


    Nonki Takahashi

    Friday, May 27, 2016 4:28 AM
  • Like this (ID: RXH939-1) from any region (x,y, w,h) in the GW ?
    Friday, May 27, 2016 12:56 PM
    Answerer
  • elastic rotation: RXH939-2
    Friday, May 27, 2016 2:57 PM