License New BSD license
Lines 28
Keywords
bogosort (5) flow charts (4) nodebox (8)
Included in this Library
Permissions
Owner: Theodore Test
Viewable by Everyone
Editable by All Siafoo Users
Hide
Writing an article is easy - try our reStructured Text demo Join Siafoo Now or Learn More

Bogosort Flow Chart Atom Feed 0

In Brief A quick script to generate a flow chart for the Bogosort algorithm.... more
# 's
 1'''A quick Nodebox script to generate a flow chart for the Bogosort algorithm.'''
2
3
4size(500,500)
5fill(0.9)
6stroke(None)
7rect(0,0,WIDTH,HEIGHT)
8colormode(HSB)
9fh = 59.0
10fs = 71.0
11fb = 97.0
12fill(fh/100,fs/100,fb/100)
13stroke(0)
14strokewidth(2)
15fontsize(25)
16
17
18
19push()
20translate(36,0)
21named_rect_node(0,50,200,80,text_string='Start',round_edges=0.5,draw_it=True)
22named_rect_node(0,400,200,80,text_string='End',round_edges=0.5,draw_it=True)
23
24
25fill(1)
26named_diamond_node(0,200,200,100,'Is Sorted?')
27named_rect_node(275,200,150,100,'Shuffle')
28
29fill(0)
30ps = 7
31bs = 136
32d_x = 100
33straight_flow_arrow(d_x,135,d_x,195,pointer_size=ps,text_string='',back_stroke=bs)
34straight_flow_arrow(d_x,305,d_x,395,ps,text_string ='Yes',back_stroke=bs)
35
36straight_flow_arrow(d_x+60,225,d_x+170,225,pointer_size=ps,text_string='No',back_stroke=bs)
37straight_flow_arrow(d_x+170,275,d_x+60,275,pointer_size=ps,back_stroke=bs)

A quick script to generate a flow chart for the Bogosort algorithm.

http://www.siafoo.net/image/67

Comments

over 8 years ago (04 Aug 2008 at 01:20 PM) by Stou S.
Woah... that is sweet.