Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 18 Oct 2019, 05:19
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Nicons-V4 29/08/2015
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 6 [84 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Author Message
SFR


Joined: 26 Oct 2011
Posts: 1737

PostPosted: Fri 12 Dec 2014, 19:19    Post subject:  

Bash does not support trigonometric functions and floating point operations at all.
Both bc and awk do, but personally I'd choose the latter, as it's easier to cut off the floating point part:
Code:
# DEG=70; RADIUS=300; originX=0; originY=0
# SIN=`awk 'BEGIN {printf("%.0f\n", '$originX' + '$RADIUS' * sin('$DEG' * (3.14 / 180) ))}'`
# COS=`awk 'BEGIN {printf("%.0f\n", '$originY' + '$RADIUS' * cos('$DEG' * (3.14 / 180) ))}'`
# echo "Sin=$SIN   Cos=$COS"
Sin=282   Cos=103
#

Note that bc & awk operate in radians, that's why *(3.14/180).

PS.I was never good at trigonometry, but hopefully the above is correct...

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 2007
Location: Germany

PostPosted: Fri 12 Dec 2014, 20:10    Post subject:  

stemsee wrote:
Thanks ... I had a look but didn't click for me!

Sorry.

I just entered man cos into the terminal and it just popped up this page in a browser. Just did not have deeper look into the results.

_________________
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) Laughing

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! Wink
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Fri 12 Dec 2014, 21:36    Post subject:  

thanks @SFR

I am on the right track now.

@ RSH no problem.
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Fri 12 Dec 2014, 21:46    Post subject:  

Nicons-v2.3 released for testing. see first post

Comes with ten presets.
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sat 13 Dec 2014, 13:31    Post subject:  

First circlular appears! Yippee.
capture15211.jpg
 Description   2nd circlular
 Filesize   25.83 KB
 Viewed   368 Time(s)

capture15211.jpg

capture24640.jpg
 Description   rad
 Filesize   27.34 KB
 Viewed   364 Time(s)

capture24640.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sat 13 Dec 2014, 18:47    Post subject:  

circle manipulated
capture26752.jpg
 Description   
 Filesize   23.27 KB
 Viewed   344 Time(s)

capture26752.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 09:35    Post subject:  

getting mastery over the circle's attributes and positioning.
capture21595.jpg
 Description   centred
 Filesize   26.89 KB
 Viewed   325 Time(s)

capture21595.jpg

capture20128.jpg
 Description   the beginning of concentric circles
 Filesize   26.19 KB
 Viewed   328 Time(s)

capture20128.jpg

capture15465.jpg
 Description   squiggles
 Filesize   26.38 KB
 Viewed   322 Time(s)

capture15465.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 09:41    Post subject:  

35 icons to form a circle
capture23857.jpg
 Description   
 Filesize   26.75 KB
 Viewed   319 Time(s)

capture23857.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 11:35    Post subject:  

trying for spirals
capture17149.jpg
 Description   ex
 Filesize   26.78 KB
 Viewed   324 Time(s)

capture17149.jpg

capture9802.jpg
 Description   experiment
 Filesize   29.89 KB
 Viewed   316 Time(s)

capture9802.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 11:37    Post subject:  

ex
capture23626.jpg
 Description   
 Filesize   31.74 KB
 Viewed   310 Time(s)

capture23626.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 11:41    Post subject:  

Spiral acheived!
capture23871.jpg
 Description   
 Filesize   36.73 KB
 Viewed   308 Time(s)

capture23871.jpg

capture7865.jpg
 Description   spiral
 Filesize   32.98 KB
 Viewed   306 Time(s)

capture7865.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 12:12    Post subject:  

Two presets added: Spiral and Circle.

To do
1) Concentric circles
2) multiple circles
3) Love Hearts
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 12:22    Post subject:  

Added combo preset surrounded spiral
capture28258.jpg
 Description   surrounded spiral
 Filesize   35.49 KB
 Viewed   302 Time(s)

capture28258.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 12:28    Post subject:  

squared circle
capture1962.jpg
 Description   
 Filesize   27.53 KB
 Viewed   304 Time(s)

capture1962.jpg

capture22602.jpg
 Description   squared circles
 Filesize   22.85 KB
 Viewed   304 Time(s)

capture22602.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2485
Location: In The Way

PostPosted: Sun 14 Dec 2014, 15:47    Post subject:  

Star
capture4692.jpg
 Description   star
 Filesize   20.16 KB
 Viewed   291 Time(s)

capture4692.jpg

Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 2 of 6 [84 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0505s ][ Queries: 12 (0.0074s) ][ GZIP on ]