Multimedia Fun with OpenOffice Calc        imacatimacat@mail.imacat.div.tw      2013-04-19
“Multimedia Fun with OpenOffice Calc” is created by imacat (Yang Shih-Ching),and licensed under a Creative Commons Attribu...
Create charts and reports
imacat●   Member of the Apache OpenOffice Project    Management Committee●   An OpenOffice committer●   System administrat...
Question:What do you do with a spreadsheet?
Counting salaries
Counting student scores
Creating charts and reports
Creating quotations
Doing calculation for strategy games
Voting machine
…
This talk is a modification     of my previous talkin ApacheCon Europe 2012    at Sinsheim, German       on 2012/11/6…
…with additions ofsome of my interesting works afterwards.
And my talk in Germanwas based on my lightning talk      in COSCUP 2013
Has anyone attended to my lightning talk         in COSCUP 2013?Has anyone remember what I had done?
My lightning talk in COSCUP 2013       was about something I didjust one week before COSCUP 2013,      which I had not eno...
And here is the story.
Long time ago in the far, far land   when I was still a child…
Long time ago in the far, far land         when I was still a child…Well, actually it was only in last August. :p
I saw on my RSS reader...
So I followed the story and  watched the video…
It’s cool, isn’t it?
It’s cool, isn’t it?Yes, it’s SO COOL!
I forwarded it onto our Google Plus,      our Facebook fans page,     our forums, local forum, etc.
I forwarded it onto our Google Plus,      our Facebook fans page,     our forums, local forum, etc.          Then I put it...
Until I saw Rob talking about this        video the next day…
So I watched it again, and also the      “behind the scenes”…
Well, I think…
Well, I think…Yeah, I can do it…
Well, I think…Yeah, I can do it…programmatically!
Creating mosaic arts involvescalculating the average colors of image blocks.Since neither OpenOffice BASIC nor UNO API    ...
So here it is… ^_^
(demonstration)
It’s cool, isn’t it?
No.
No, that’s not cool.It’s uglier than the original “Stop-Motion Excel”.     It’s not the “eye candy” that I imagined.
Why?     The original “Stop-Motion Excel”     was painted manually, cell by cell.MysteryGuitarMan painted it with a fixed ...
Comparing Hand-Painted Colors  with Mosaic Average Colors
So I need to find something more cool,           something sharp,    something with a high contrast.
That is not an easy task.
The idea of Calc Mosaic     is not only to create mosaic arts,but also to create stop-motion animations.
But it takes averagely 20 secondsto create a spreadsheet of mosaic art    with the Java UNO application.      I cannot run...
So I turn to another method,to create each frame with a spreadsheet,       and play them in sequence,       as a stop-moti...
But then a spreadsheet document can only contain a maximum of 256 spreadsheets.
Since I only have 256 frames,     this cannot be long.
I remembered there is the iPod Ad
The iPod Ad…●   Has only 31 seconds, corresponding to 8    FPS if we are having 256 frames.
The iPod Ad…●   Has only 31 seconds, corresponding to 8    FPS if we are having 256 frames.●   Has sharp images, high cont...
The iPod Ad…●   Has only 31 seconds, corresponding to 8    FPS if we are having 256 frames.●   Has sharp images, high cont...
So here it is…
(demonstration)
At the same time, Villeroy responded to myCalc Mosaic on the forum, using a different                approach.
Villeroy’s Response
So here it is…
(demonstration)
As you can see, Villeroy places the color values in the cells. The OpenOffice BASIC macro can read andupdate the cell back...
Villeroy’s approach still has some         disadvantages…
Disadvantages of            Villeroy’s Approach●   You still need to have the color values first.
Disadvantages of             Villeroy’s Approach●   You still need to have the color values first.●   The frame rate is st...
Disadvantages of             Villeroy’s Approach●   You still need to have the color values first.●   The frame rate is st...
This is a different approach than me.    But I still got greatly inspired.
The color values can be saved in the sheets,   and painted with OpenOffice BASIC.        This can make it a lot faster.
And I know there is the setDataArray()     in the interface XCellRangeData.I can populate all the color values at once    ...
The New Process Will Be…1.Calculates the average colors of mosaic  cells with the Java application.
The New Process Will Be…1.Calculates the average colors of mosaic  cells with the Java application.2.Passes the color valu...
The New Process Will Be…1.Calculates the average colors of mosaic  cells with the Java application.2.Passes the color valu...
So the problem becomes:        Writing an applicationboth in Java and OpenOffice BASIC.
So the problem becomes:         Writing an application both in Java and OpenOffice BASIC.               Or, simply,Creatin...
In the unpublished UNO API,    there is a BasicLibraries property            in OfficeDocument     that application develo...
There’s also the XScriptProvider interface        that I can use it to invoke    the existing OpenOffice macros.
So I use them to “inject” the BASIC macrosinto the newly-created spreadsheet document,             and run these macros.
In fact, I don’t even need to use setDataArray()to paste the color values into the spreadsheets.   I can pass the color va...
This is troublesome,     but the result is amazing.It is 8 times faster then before!
When I prepare for my ApacheCon          presentation,I became more and more greedy.
I want something new,        something hot,something gets people excited!
Then I came across this…
Something hot…
Well, again, I think…
Well, again, I think… Yeah, I can do it!
So here is it.
When preparing for OSDC.tw,Gangnam Style became outdated.      I need a new one.
(demonstration)
That is the story of Calc Mosaic.To create your own Mosaic video,        get Calc Mosaic at    http://sf.net/p/calcmosaic.
More Than Calc Mosaic
Last year after I returned from German, I attended to a speech in our institute          at the end of November.       It ...
New Media Art
Oh, no…
Oh, no…I can do it.
I can do it…●   I can play piano notes using the Shell    command “mplayer” in OpenOffice BASIC.
I can do it…●   I can play piano notes using the Shell    command “mplayer” in OpenOffice BASIC.●   I can attach click eve...
I can do it…●   I can play piano notes using the Shell    command “mplayer” in OpenOffice BASIC.●   I can attach click eve...
I can do it…●   I can play piano notes using the Shell    command “mplayer” in OpenOffice BASIC.●   I can attach click eve...
(demonstration)
Furthermore,with a little modification,I released a piano quest     in the Christmas.
(demonstration)
Thank you.Any question?
Upcoming SlideShare
Loading in …5
×

Multimedia Fun with OpenOffice Calc

962 views

Published on

Multimedia Fun with OpenOffice Calc
發表於OSDC.tw 2013 2013/4/19 15:30中研院國際會議室

Get Calc Mosaic at http://sf.net/p/calcmosaic

Published in: Technology, Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
962
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Multimedia Fun with OpenOffice Calc

  1. 1. Multimedia Fun with OpenOffice Calc imacatimacat@mail.imacat.div.tw 2013-04-19
  2. 2. “Multimedia Fun with OpenOffice Calc” is created by imacat (Yang Shih-Ching),and licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
  3. 3. Create charts and reports
  4. 4. imacat● Member of the Apache OpenOffice Project Management Committee● An OpenOffice committer● System administrator of OpenOffice forum and Wiki● A member of Women in Free and Open Source Software● A graduate student from National Taiwan Normal University
  5. 5. Question:What do you do with a spreadsheet?
  6. 6. Counting salaries
  7. 7. Counting student scores
  8. 8. Creating charts and reports
  9. 9. Creating quotations
  10. 10. Doing calculation for strategy games
  11. 11. Voting machine
  12. 12.
  13. 13. This talk is a modification of my previous talkin ApacheCon Europe 2012 at Sinsheim, German on 2012/11/6…
  14. 14. …with additions ofsome of my interesting works afterwards.
  15. 15. And my talk in Germanwas based on my lightning talk in COSCUP 2013
  16. 16. Has anyone attended to my lightning talk in COSCUP 2013?Has anyone remember what I had done?
  17. 17. My lightning talk in COSCUP 2013 was about something I didjust one week before COSCUP 2013, which I had not enough time to finish and present it completely.
  18. 18. And here is the story.
  19. 19. Long time ago in the far, far land when I was still a child…
  20. 20. Long time ago in the far, far land when I was still a child…Well, actually it was only in last August. :p
  21. 21. I saw on my RSS reader...
  22. 22. So I followed the story and watched the video…
  23. 23. It’s cool, isn’t it?
  24. 24. It’s cool, isn’t it?Yes, it’s SO COOL!
  25. 25. I forwarded it onto our Google Plus, our Facebook fans page, our forums, local forum, etc.
  26. 26. I forwarded it onto our Google Plus, our Facebook fans page, our forums, local forum, etc. Then I put it away and return to my textbook.
  27. 27. Until I saw Rob talking about this video the next day…
  28. 28. So I watched it again, and also the “behind the scenes”…
  29. 29. Well, I think…
  30. 30. Well, I think…Yeah, I can do it…
  31. 31. Well, I think…Yeah, I can do it…programmatically!
  32. 32. Creating mosaic arts involvescalculating the average colors of image blocks.Since neither OpenOffice BASIC nor UNO API has any method to obtain the colors of individual pixels, I have use Java to do this.
  33. 33. So here it is… ^_^
  34. 34. (demonstration)
  35. 35. It’s cool, isn’t it?
  36. 36. No.
  37. 37. No, that’s not cool.It’s uglier than the original “Stop-Motion Excel”. It’s not the “eye candy” that I imagined.
  38. 38. Why? The original “Stop-Motion Excel” was painted manually, cell by cell.MysteryGuitarMan painted it with a fixed palette, but not “average colors”.It looks sharp. It feels like an animation.
  39. 39. Comparing Hand-Painted Colors with Mosaic Average Colors
  40. 40. So I need to find something more cool, something sharp, something with a high contrast.
  41. 41. That is not an easy task.
  42. 42. The idea of Calc Mosaic is not only to create mosaic arts,but also to create stop-motion animations.
  43. 43. But it takes averagely 20 secondsto create a spreadsheet of mosaic art with the Java UNO application. I cannot run the animationby creating the mosaic art at real-time.
  44. 44. So I turn to another method,to create each frame with a spreadsheet, and play them in sequence, as a stop-motion animation.
  45. 45. But then a spreadsheet document can only contain a maximum of 256 spreadsheets.
  46. 46. Since I only have 256 frames, this cannot be long.
  47. 47. I remembered there is the iPod Ad
  48. 48. The iPod Ad…● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames.
  49. 49. The iPod Ad…● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames.● Has sharp images, high contrasts.
  50. 50. The iPod Ad…● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames.● Has sharp images, high contrasts.● Is very famous.
  51. 51. So here it is…
  52. 52. (demonstration)
  53. 53. At the same time, Villeroy responded to myCalc Mosaic on the forum, using a different approach.
  54. 54. Villeroy’s Response
  55. 55. So here it is…
  56. 56. (demonstration)
  57. 57. As you can see, Villeroy places the color values in the cells. The OpenOffice BASIC macro can read andupdate the cell background colors accordingly. OpenOffice BASIC is a lot faster than Java UNO.This makes it possible to animate at real time.
  58. 58. Villeroy’s approach still has some disadvantages…
  59. 59. Disadvantages of Villeroy’s Approach● You still need to have the color values first.
  60. 60. Disadvantages of Villeroy’s Approach● You still need to have the color values first.● The frame rate is still low.
  61. 61. Disadvantages of Villeroy’s Approach● You still need to have the color values first.● The frame rate is still low.● Villeroy updates the colors with styles. – A lot faster than painting the background color cell by cell. – The number of colors to use is limited. That is why it is gray-scaled.
  62. 62. This is a different approach than me. But I still got greatly inspired.
  63. 63. The color values can be saved in the sheets, and painted with OpenOffice BASIC. This can make it a lot faster.
  64. 64. And I know there is the setDataArray() in the interface XCellRangeData.I can populate all the color values at once instead of hundreds of UNO calls to set the CellBackColor property Of SheetCell.
  65. 65. The New Process Will Be…1.Calculates the average colors of mosaic cells with the Java application.
  66. 66. The New Process Will Be…1.Calculates the average colors of mosaic cells with the Java application.2.Passes the color values from Java to OpenOffice BASIC.
  67. 67. The New Process Will Be…1.Calculates the average colors of mosaic cells with the Java application.2.Passes the color values from Java to OpenOffice BASIC.3.Paints the background colors of the spreadsheet cells with the OpenOffice BASIC macro.
  68. 68. So the problem becomes: Writing an applicationboth in Java and OpenOffice BASIC.
  69. 69. So the problem becomes: Writing an application both in Java and OpenOffice BASIC. Or, simply,Creating the OpenOffice BASIC macros through the UNO API with Java.
  70. 70. In the unpublished UNO API, there is a BasicLibraries property in OfficeDocument that application developers canaccess, insert or delete the BASIC macros.
  71. 71. There’s also the XScriptProvider interface that I can use it to invoke the existing OpenOffice macros.
  72. 72. So I use them to “inject” the BASIC macrosinto the newly-created spreadsheet document, and run these macros.
  73. 73. In fact, I don’t even need to use setDataArray()to paste the color values into the spreadsheets. I can pass the color values as parameters to the invoked BASIC macros.
  74. 74. This is troublesome, but the result is amazing.It is 8 times faster then before!
  75. 75. When I prepare for my ApacheCon presentation,I became more and more greedy.
  76. 76. I want something new, something hot,something gets people excited!
  77. 77. Then I came across this…
  78. 78. Something hot…
  79. 79. Well, again, I think…
  80. 80. Well, again, I think… Yeah, I can do it!
  81. 81. So here is it.
  82. 82. When preparing for OSDC.tw,Gangnam Style became outdated. I need a new one.
  83. 83. (demonstration)
  84. 84. That is the story of Calc Mosaic.To create your own Mosaic video, get Calc Mosaic at http://sf.net/p/calcmosaic.
  85. 85. More Than Calc Mosaic
  86. 86. Last year after I returned from German, I attended to a speech in our institute at the end of November. It was about new media art.
  87. 87. New Media Art
  88. 88. Oh, no…
  89. 89. Oh, no…I can do it.
  90. 90. I can do it…● I can play piano notes using the Shell command “mplayer” in OpenOffice BASIC.
  91. 91. I can do it…● I can play piano notes using the Shell command “mplayer” in OpenOffice BASIC.● I can attach click events with picture objects.
  92. 92. I can do it…● I can play piano notes using the Shell command “mplayer” in OpenOffice BASIC.● I can attach click events with picture objects.● I can change the colors of the Calc spreadsheet cells.
  93. 93. I can do it…● I can play piano notes using the Shell command “mplayer” in OpenOffice BASIC.● I can attach click events with picture objects.● I can change the colors of the Calc spreadsheet cells.● Its possible to create an animated, interactive Piano with Calc.
  94. 94. (demonstration)
  95. 95. Furthermore,with a little modification,I released a piano quest in the Christmas.
  96. 96. (demonstration)
  97. 97. Thank you.Any question?

×