some mods to make it compile...

)abbrev package RANGRAPH RandomGraph
RandomGraph(): Exports == Implementation where
     Exports == with
         randomGraph: () -> GraphImage

     Implementation == add
         randomGraph() ==
             nHues ==> 27 -- hardcoded in FriCAS :(
             nPoints ==> 100

             randomX: DoubleFloat := 
((uniform(0,1)$RandomFloatDistributions)())::DoubleFloat
             randomY: DoubleFloat := 
((uniform(0,1)$RandomFloatDistributions)())::DoubleFloat
             randomPoint := point([randomX, randomY])$Point(DoubleFloat)
             randomPointColor := dark(color(1 + 
(random(nHues)$Integer))$Color)$Palette
             randomLineColor := dark( color(1 + 
(random(nHues)$Integer))$Color)$Palette
             randomPointSize := (1 + random(30)$Integer)::PositiveInteger

             gim: GraphImage := graphImage()$GraphImage

             for i in 1..nPoints repeat
                 component(gim, randomPoint, randomPointColor, 
randomLineColor, randomPointSize)$GraphImage

             return gim

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to