-
bee18
Not about technical things, but I believe omz should provide demo video of Pythonista both on the site and in the app store. The video should be able to present the ability of Pythonista much better than just static images, especially the advance features. Omz can take a look at Codea's demo video, it's quite good. And I believe a good demo video would also be able to attract new purchasers.
Thank you.
-
bee18
Thank you for providing link to other projects. filenav seems pretty cool. I'll start with that. :)
-
bee18
Hi,
I plan to write a simple app that puts a datetime stamp to a photo based on its EXIF data. So far I haven't found a way to read the EXIF data, especially using Pythonista. Can anybody give me a light on this? Thank you.
-Bee
-
bee18
If the photo doesn't have exif data, can I take the data from the file info e.g. datetime of file creation? Is there any python function to read it? Not the datetime of last file modification but the true file creation.
Thank you.
-
-
-
bee18
Ok... I don't understand why the list is NOT displayed correctly in this forum. :(
-
bee18
I just forked your minesweeper gists into:
https://github.com/git-bee/pythonista-minesweeper
Or, here the pastebin version:
Enhancements:
- bigger grid by default
- support landscape orientation
- no bomb at the first try :)
- tap-and-hold on open tile to auto-reveal
- game timer starts on first tap on tile, instead of on first tap on the smiley button
- some minor informational text (and a title)
- some minor better variable naming (IMHO)
I wrote this on my iPod touch, so my modification might doesn't work correctly on iPad due the different display aspect ratio. You could simply adjust the value in the source code.
Have fun! :)
-
bee18
Thank you for sharing your code. It's pretty neat. Really remind me of Windows. (FYI, I no longer use Windows since 2008). :)
Just one tiny little bit of annoyance… the real windows' minesweeper never give a bomb at the first try. Never. ;)
And also a double click (tap) would automatically reveal the already obvious blocks. This really helps reducing time in order to get fastest time record. Btw, my fastest record is 3 seconds on a small grid (10 bombs). :)
-
bee18
It will be called exactly 60 times per second if you got very very simple things to draw which require less than 1/60 second to process. But once you got a bit more complex drawing and or computation, the process would take longer. The more complex your program the longer it takes to draw. So, you need another way to get your program syncs with the real time. :)
-
bee18
I found some other code of mine too regarding analog clock. Here they are:
- regular clock: http://pastebin.com/pCUuWfSW
- radial clock: http://pastebin.com/M165BTzE
- racing clock: http://pastebin.com/BnJrKY4v
In case someone interested. :)
-
bee18
Here we go... Check it out at <strike>http://pastebin.com/vAc3SyVF</strike>
Update: Sorry, the link above is deleted and no longer valid. Use the new one below. And the forum can't display the strike attribute correctly. :)
Hope it useful. :)
-
bee18
I made another analog clock a while ago, just for exercising. But instead of using transformation, like in the example, I draw the clock using simple math (trigonometry). Let me find the code and post it on pastebin.
I'll be back! ^_^
-
bee18
As the title said... I request for canvas-like vector drawing functions for scene module. It's very helpful for us to make a simple interactive app using these functions. What do others think? :)
-
bee18
I'm glad to read that Pythonista is more successful commercially than Editorial. I'm not a Python programmer, but I could use Pythonista for coding exercise and brainstorming, especially on the go, or while relaxing on the bed or couch. That really helps for my use case. :)
-
bee18
Pick
detail
value randomly, you'll get beautiful images out of the equation. Check out the latest update. -
bee18
I couldn't find a floodfill function to fill an arbitrary area with a specified color. If you want to get a smooth edge of the heart, try to play with the
detail
constant. I found 62.66 seems to be smooth enough. I also found 12.66, 25, 37.66, etc seem to be smooth as well. Try to find other values.update: Well,
fill_path()
does fill the inner part. The problem is how to get smooth edges. So, "correct"detail
value seems the only answer. At least with this code. Try my updated code above. -
-
-
bee18
Try this one...
# draw a heart using equation import canvas, sys, random from console import clear from datetime import datetime from math import sin, cos, pi w = h = 600 # canvas size detail = random.random() * 100 # larger is slower # almost perfect : 12.485 75.05 125.3 # half left : 12.525 # half right : 12.605 scale = 15 # larger is bigger origin = w/2 # plot origin on canvas def draw_heart(outline = False): first = True for t in xrange(int(2*pi * detail)): t = t * detail # heart equation x = 16*(sin(t) ** 3) y = 13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t) # scale result x = origin + x * scale y = origin + y * scale + scale*2 # hide first line if first: canvas.move_to(x, y) first = False else: canvas.add_line(x, y) # set color canvas.set_fill_color(1,0.5,0.5) canvas.set_stroke_color(0.5,0,0) canvas.set_line_width(detail/2) # draw heart if outline: canvas.draw_path() else: canvas.close_path() canvas.fill_path() clear() print 'Calculating... d =',detail start = datetime.now() canvas.set_size(w,h) canvas.draw_rect(0,0, w,h) #canvas.draw_line(0,h/2,w,h/2) #canvas.draw_line(w/2,0,w/2,h) draw_heart(True) # outlined draw_heart() # filled stop = datetime.now() print(stop-start)
Updated with comment and constant separation. Another update, add drawing timer. Another update, add fill mode via function argument. Another update, pick
detail
value randomly, creating beautiful images out of the equation.