Board Logo
« Simple Curves »

Welcome Guest. Please Login or Register.
Jan 21st, 2018, 12:55am


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Please use the forums Search feature before asking.
Please post code using the code box described in Format Your Messages.
This will keep indentation, separate it better form the message and prevent gibberish.
If the code is too long for one post or additional files are needed, upload a ZIP archive to the Just BASIC Files Archive Site.

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: Simple Curves  (Read 4035 times)
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Simple Curves
« Thread started on: Jan 30th, 2014, 12:50pm »

OK, we have a good few new folks registered yet to post. So this is for all you new folks to Just BASIC.

Simple task, display your name on screen in a curve. It can be letter by letter curved, it can be multiple names in a curve. We don't care it just needs to look errr..... not straight. It can be colored it can move it can flash but essentially the letters or name cannot be in a straight line.

Show us what you got!
User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: Simple Curves
« Reply #1 on: Jan 31st, 2014, 06:38am »

Well well well.
I probably don't qualify as "new" anyway wink.
But my "scribble" program is perfectly capable of some handwriting. (I've got a tablet so it was easy for me).
Could post if anybody wants wink
EDIT:
User Image
« Last Edit: Feb 2nd, 2014, 04:47am by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
tenochtitlanuk ( John F)
Full Member
ImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 430
xx Re: Simple Curves
« Reply #2 on: Jan 31st, 2014, 11:49am »

I too am definitely more 'oldie' than 'noob'!
Fun task, anyway. I'll put up code on my website after others have ( I hope!) had a go.
User Image
EDIT see wavytext.html on my site.
EDIT2 modified for wavy freehand writing!
User Image
« Last Edit: Feb 1st, 2014, 10:01am by tenochtitlanuk ( John F) » User IP Logged

Visit my LB/JB pages at http://www.diga.me.uk/index.html
I use XP and Ubuntu Linux on old machines!
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: Simple Curves
« Reply #3 on: Jan 31st, 2014, 4:32pm »

OK, you don't need to be a new JB user all entries welcome.
User IP Logged

reecely
Guest
xx Re: Simple Curves
« Reply #4 on: Feb 1st, 2014, 12:51pm »

I'll give this a try.
User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: Simple Curves
« Reply #5 on: Feb 8th, 2014, 2:11pm »

What? No entries?
Here's one. You draw curve by mouse - and it fits a name to it.
Code:
nomainwin
name$ = "Anatoly Sheyanov"
dim x(1000), y(1000)
open "simple curves" for graphics_nsb as #gr
#gr "trapclose [quit]"
#gr "down"
#gr "place 50 140"
#gr "\Press and hold left button"
#gr "\Draw a curve"
#gr "\Release a button :)"
#gr "when leftButtonDown [dn]"
#gr "when leftButtonUp [up]"
#gr "when leftButtonMove [move]"

wait
[dn]
    #gr "cls"
    draw=1
    i=0
    wait

[up]
    draw=0
    #gr "cls"
    d=i/len(name$)
    jj=0
    for j = 1 to len(name$)
        jj=jj+d
        #gr "place ";x(jj);" ";y(jj)
        #gr "\";mid$(name$,j,1)
    next
    wait

[move]
    if not(draw) then wait
    i=i+1
    x(i)=MouseX
    y(i)=MouseY
    #gr "set ";x(i);" ";y(i)
wait

[quit]
    close #gr
    end
 
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
reecely
Guest
xx Re: Simple Curves
« Reply #6 on: Feb 9th, 2014, 4:30pm »

Does it have to be in a graphics window? I can't draw my name using turtle graphics.
User IP Logged

Mallot1
Full Member
ImageImageImageImage


member is offline

Avatar

Mallot1


Homepage PM

Gender: Male
Posts: 194
xx Re: Simple Curves
« Reply #7 on: Feb 9th, 2014, 6:27pm »

Im sorry, ijustdont understand what is trying to be done.
User IP Logged

User Image
User Image
Game Development Blog: http://mallot1development.wordpress.com
High Flyer! cheesy http://gamegrapestudios.com/highflyer
reecely
Guest
xx Re: Simple Curves
« Reply #8 on: Feb 9th, 2014, 6:45pm »

Look at the examples provided by tenochtitlanuk. smiley
User IP Logged

Mallot1
Full Member
ImageImageImageImage


member is offline

Avatar

Mallot1


Homepage PM

Gender: Male
Posts: 194
xx Re: Simple Curves
« Reply #9 on: Feb 9th, 2014, 6:50pm »

alright but are we making a drawing pad? or anprogram that displays an image we drawn of our name?
User IP Logged

User Image
User Image
Game Development Blog: http://mallot1development.wordpress.com
High Flyer! cheesy http://gamegrapestudios.com/highflyer
tenochtitlanuk ( John F)
Full Member
ImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 430
xx Re: Simple Curves
« Reply #10 on: Feb 10th, 2014, 04:47am »

Here's another approach.
The task is to learn interesting ways to position text.
In England we say "There's more than one way to skin a cat!".
What are the Russian, Scottish and French versions of THAT odd saying??!!
Swap to the other remmed function, if you are confident with trigonometry!
Code:
    mainwin 80 40

    text$ ="Tenochtitlanuk "

    Lt    =len( text$)

    for i =0 to Lt *10
        ' un-rem one of the next two lines
        p =i mod Lt: print tab( p +10); mid$( text$, p, 1)
        'p =i mod Lt: print tab( 40 +30 *sin( i /10)); mid$( text$, p +1, 1)
    next i


    end
 

User Image
If you send the result of the above approach to a printer you can get great long strips of wavy writing.
Years ago I used this technique to make a wide-carriage dot-matrix printer into a chart-recorder. You print a single pixel out of the 10000 or so available sideways, then advance the paper just one pixel. Got very high resolution graphs of days of temperature and brightness of light in my classroom. Immediate hard copy, in days when we had no disk storage nor much RAM...
It also gave high-res graphs of all sorts of mathematical curves,at a time when screens had resolutions like 64x48...

Basically, have a play with text and show us what results you got!

PS see earlier comments about the 'stickiness' of the 'mainwin' command.
« Last Edit: Feb 10th, 2014, 05:09am by tenochtitlanuk ( John F) » User IP Logged

Visit my LB/JB pages at http://www.diga.me.uk/index.html
I use XP and Ubuntu Linux on old machines!
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: Simple Curves
« Reply #11 on: Feb 10th, 2014, 06:41am »

Quote:
In England we say "There's more than one way to skin a cat!".
What are the Russian, Scottish and French versions of THAT odd saying??!!


I know that 100% exact translation is not possible. With idiomatic expressions, it deems impossible wink
I've just found an article that examined 100 English sayings and searched Russian translation.
(in Russian sorry. You can run it through Google translate for a good laugh, though
http://www.scienceforum.ru/2013/230/3710
)
11 happened to be exact match, like "Honesty is the best policy"
57 is almost perfect translations, like
"Too much knowledge makes the head bald" in Russian would be "Know too much, will grow old too soon"
; but rest is totally different, like
"It never rains but it pours" corresponts to russian "Trouble came - open the gate" with meaning of "Misfortunes always follow one another".

So there is no skinning the cat in Russian wink
There is a saying with meaning "There should be another one" (way, girl, etc)
Russian "Svet klinom ne soshelsya"
"Light doesn't came to a wedge [on this one]"
Except this is old saying, where "Light" means "World".
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
tenochtitlanuk ( John F)
Full Member
ImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 430
xx Re: Simple Curves
« Reply #12 on: Feb 10th, 2014, 4:59pm »

Had a bit of fun checking out Russian and English sayings. I only have a little Russian, but knowing Cyrillic characters and given the direct nature of EASY Russian ( eg leaving out verbs in phrases that in English would read 'here is a computer' and saying just 'here computer'.) I can make some sense of them.
I thought the Tolstoy one was vaguely appropriate to this thread- draw smooth curves ( of text) by computer- or possible along very irregular ravine paths! The fourth one CERTAINLY applies to writing code on computers. The second one looks very useful for excusing myself for any mistakes I make in coding. And I reckon I'm both 'old' and an 'old-timer'...
User Image
« Last Edit: Feb 10th, 2014, 4:59pm by tenochtitlanuk ( John F) » User IP Logged

Visit my LB/JB pages at http://www.diga.me.uk/index.html
I use XP and Ubuntu Linux on old machines!
Facundo
Board Moderator


member is offline

Avatar




PM

Gender: Male
Posts: 1303
xx Re: Simple Curves
« Reply #13 on: Feb 15th, 2014, 07:41am »

I understand the phrase "There's more than one way to skin a cat!". Is like you have many ways to reach the same goal, or something like that. tongue I couldn't find the Spanish version, there is no a direct/literal translation. Btw why would someone like to skin a cat anyway? :|
User IP Logged

cundo aka MSlayer
tenochtitlanuk ( John F)
Full Member
ImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 430
xx Re: Simple Curves
« Reply #14 on: Feb 15th, 2014, 09:22am »

...a mi me gustan mucho los paises hispanohablantes- y no obstante las Malvinas, la Argentina tambien.
Tienen Uds. muchos frases interesantes!

A suggested Spanish equivalent was 'cada quien tiene su manera de matar pulgas'.

A great aspect of these new web-connected years is that we get to 'talk' with others from countries we may never visit, and may only guess from names and timezones. English native-language speakers have a dreadful reputation for ignoring the language & culture of others. Not always deserved.
At least here we all 'speak computing'!
User IP Logged

Visit my LB/JB pages at http://www.diga.me.uk/index.html
I use XP and Ubuntu Linux on old machines!
Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls