none
Turtle Molecular Challenge - CCl4 and more RRS feed

  • General discussion

  • Hello there! Here is Thaelmann-Pioniere, a novice programmer. Although I have a German username, I am not from a German speaking country. This is the first work(http://smallbasic.com/program/?LWP757) I published on this forum. The content is the molecular structural formula of carbon tetrachloride. There are many things that need improvement because I am not very familiar with Small Basic. I hope to have a good time with you.

    Seid Bereit!

    Best Regards.


    Monday, March 2, 2020 7:06 AM

All replies

  • Hi! After a day, I am back again. The content of today's project is the same as yesterday, but there are many improvements. For example, it was reduced from 48 to 34 lines and variables were introduced. Therefore, this example can be applied in more places. I plan to bring a molecular structure model of methane(CH4) and silicon tetrafluoride(SiF4) tomorrow.

    The ID of the project is LWP757-1.

    p.s. : How to contribute to this thread? https://social.msdn.microsoft.com/Forums/en-US/4eb2921e-6232-4186-b2f9-0b2239f7de6b/molecular-challenge?forum=smallbasic

    Best Regards.

    Tuesday, March 3, 2020 1:44 PM

  • p.s. : How to contribute to this thread? https://social.msdn.microsoft.com/Forums/en-US/4eb2921e-6232-4186-b2f9-0b2239f7de6b/molecular-challenge?forum=smallbasic

    In that topic you can click on "reply" and then you can post there

    Jan [ WhTurner ] The Netherlands

    Tuesday, March 3, 2020 4:03 PM
    Answerer
  • Hi Thealmann-Pioniere, welcome to Small Basic!  Thank you for sharing your simple code.  I like it.

    Screen shot of a program Mokecular Challenge-Carbon tetrachloride(CCl4)


    Nonki Takahashi

    Tuesday, March 3, 2020 11:42 PM
    Moderator
  • Hello Jan,

    Thank you for your help! Sorry to bother you.

    Best Regards.

    Wednesday, March 4, 2020 3:41 AM
  • Hello Nonki,

    You flatter me! In fact, this program may be simpler and easier to read. Today or tomorrow, I will bring a few more complicated works with different contents.

    And another question: How can I add pictures and links to my posts?

    Best Regards & Thanks.



    Wednesday, March 4, 2020 3:49 AM
  • See the buttons on top of the text window (starting with B I U .....)

    Do you know you can draw lines with GraphicsWindow.Drawline(x1,y1,x2,y2) in stead of uing the turtle?


    Jan [ WhTurner ] The Netherlands


    Wednesday, March 4, 2020 10:20 AM
    Answerer
  • Hi Jan,

    Your reply reminded me. Actually when I first started this project, I thought about using it, but I encountered some problems at that time, so I switched to using turtle to draw lines. If there are no other issues, I will use it in tomorrow's project.

    Best Regards & Thank you very much!

    Wednesday, March 4, 2020 11:10 AM
  • In accordance with my promise yesterday, I brought with me molecular models of methane (CH4) and silicon tetrafluoride (SiF4) tonight. In yesterday's project(CCl4), I found some logic errors, so I will resend it today.

    The logic error is in 12~15 lines.

    Methane (CH4):NZQ605

    Silicon tetrafluoride (SiF4):DBS039-0

    New CCl4:LWP757-3

    Seid Bereit!

    Best Regards.

    Wednesday, March 4, 2020 11:34 AM
  • Jan proposes not to use Turtle, but to use GraphicWindow, so I use GraphicWindow in today's work (hydrogen peroxide)(H2O2)(KKW805). Thanks again for your advice, Jan.
    Thursday, March 5, 2020 5:59 AM
  • Hi,

    Today's work is methanol. Stay tuned.

    Best Regards.

    Friday, March 6, 2020 7:24 AM
  • Hello,

    Today's work-methanol(CH3OH).

    Methanol is one of the simplest hydrocarbons but more complex than methane. Methane is the simplest organic compound.

    The ID is NBW322.

    Seid Bereit!

    Best Regards.


    Friday, March 6, 2020 11:32 AM
  • Hi,

    I suddenly discovered that I could use this rule to color the atomic model ...

        Space-filling models also named CPK models

    So I will use it in tomorrow's work.

    Tomorrow's work may be benzene(C6H6) or cyclopropene(C3H4).

    Best Regards.

    Friday, March 6, 2020 2:12 PM
  • Hello,

    I made a model of Benzene(C6H6)(ZTM106). And I added Arrays in it. A little complicated program.

    I used Turtles again to draw pictures because it was so convenient to do it. 

    Best Regards.




    Saturday, March 7, 2020 2:53 PM
  • Hi Thaelmann-Pioniere, I like your Methanol!

    Screen shot of a program Methanol


    Nonki Takahashi

    Sunday, March 8, 2020 4:27 AM
    Moderator
  • Hello Nonki,

    You flatter me! In fact, this program may be simpler and easier to read. Today or tomorrow, I will bring a few more complicated works with different contents.

    And another question: How can I add pictures and links to my posts?

    Best Regards & Thanks.



    Hi Thaelmann-Pioniere, I created new thread for your question.  Thanks.

    How can I add pictures and links to my posts?


    Nonki Takahashi

    Sunday, March 8, 2020 4:36 AM
    Moderator
  • Hi,

    As you can see, Nonki's help(https://social.msdn.microsoft.com/Forums/en-US/a33d3e39-b9c8-47a0-8e8b-1878de0dca18/how-can-i-add-pictures-and-links-to-my-posts?forum=smallbasic) helped me solve the problem. So I will add renderings to every post with works in the future.

    Seid Bereit!

    Best Regards & Thanks Nonki's praise and help.

    p.s. I forgot to add ID to yesterday's post ... It is ZTM106.



    Sunday, March 8, 2020 6:01 AM
  • Hi,

    Today's work: Cyclopropene(C3H4).


    The ID is TMK113.

    Seid Bereit!

    Best Regards.

    Sunday, March 8, 2020 12:42 PM
  • I made a rotating methane molecule for you:

    '' 200308 WhT    rotating methane molecule
    rC=60
    rH=30
    rHh=rH/2
    rH2=2*rH
    rH4=4*rH 
    GraphicsWindow.PenWidth=10
    rH240=rH+240
    rH200=200+rHh
    For i=1 To 5
      For alfa=0 To 360
        GraphicsWindow.Clear()
        GraphicsWindow.DrawLine(270,90,270,215)
        x1=(LDMath.Sin(alfa)+2)*rH4 
        x2=(LDMath.Sin(alfa+120)+2)*rH4
        x3=(LDMath.Sin(alfa+240)+2)*rH4
        y1=20*LDMath.Cos(alfa)+300
        y2=20*LDMath.Cos(alfa+120)+300
        y3=20*LDMath.Cos(alfa+240)+300
        GraphicsWindow.FillEllipse(x1,y1,rH,rH)
        GraphicsWindow.FillEllipse(x2,y2,rH,rH)
        GraphicsWindow.FillEllipse(x3,y3,rH,rH)
        GraphicsWindow.FillEllipse(255,60,rH,rH)
        GraphicsWindow.DrawLine(rH240,rH200,x1+rHh,y1+rHh)
        GraphicsWindow.DrawLine(rH240,rH200,x2+rHh,y2+rHh)
        GraphicsWindow.DrawLine(rH240,rH200,x3+rHh,y3+rHh)
        GraphicsWindow.BrushColor="red"
        GraphicsWindow.FillEllipse(2*rH4,185,rC,rC)
        GraphicsWindow.BrushColor="blue
        Program.Delay(20)
      EndFor
    EndFor
    


    Jan [ WhTurner ] The Netherlands

    Sunday, March 8, 2020 4:09 PM
    Answerer
  • Hi Jan,

    It's very very amazing! Especially the introduction of Sin and Cos. But I have to correct one of your small mistakes: the carbon-hydrogen bond should be half red and half blue, it will make your model more beautiful.

    This is the molecular model of methane on Wikipedia:

    Best Regards & Thanks!


    Monday, March 9, 2020 2:46 AM
  • Hello,

    This is a molecular model of Formaldehyde(HCHO)(RQG434).

    Seid Bereit!

    Best Regards.

    Monday, March 9, 2020 4:14 AM
  • Hi Thaelmann-Pioniere, following 3-D image was drawn by a ray tracing program KCH420-4 - originally uploaded in this thread by ThirdMagus.

    Screen shot of a program CH4 by Raytracer


    Nonki Takahashi

    Monday, March 9, 2020 10:04 AM
    Moderator
  • Hi Nonki,
    Great work! Incredible. So beautiful. Just too slow ...

    Best Regards & Thank you!

    Monday, March 9, 2020 10:51 AM
  • a dramatic speedup by a some resolution downgrade: BQZ829

    Monday, March 9, 2020 11:34 AM
  • Hi Tryhest,

    It makes up for this flaw very well. Thanks!

    Best Regards & Thanks again.

    Monday, March 9, 2020 11:52 AM
  • Hello,

    I made a molecular model of diaminomethanal(urea)[(NH2)2CO].

    The ID is GRD203.

    Seid Bereit!

    Best wishes.


    Tuesday, March 10, 2020 9:58 AM
  • Hello,

    Here's a molecular model of Methyl formate[HC(O)OCH3] (DPH920).

    Seid Bereit!

    Best Wishes.

    Wednesday, March 11, 2020 7:31 AM
  • Hello,

    Two molecular models: 

    Hydrochloric acid (HCl) (KCH420-5

     Naphthalene (C10H8) (PPV067).

    Seid Bereit!

    Best Wishes.




    Thursday, March 12, 2020 11:52 AM
  • Hi,

    Today's work is 1,2-benzenedicarboxylic anhydride[C6H4(CO)2O].(the name is too long...)

    The ID is NSS250

    Seid Bereit!

    Best Wishes.

    Friday, March 13, 2020 12:49 PM
  • Hello,

    This is a molecular model of Glycine(C2H5NO2).

    The ID is VLG376.

    Seid Bereit!

    Best Wishes.

    Saturday, March 14, 2020 1:14 PM
  • Hello,

    Here's a work about Melamine (Its official name is 1,3,5-Triazine-2,4,6-Triamine, many chemicals have such long names...). 

    The ID is QCH183.

    Seid Bereit!

    Best Wishes.

    p.s. Some other knowledge about this chemical: It has been illegally added to some milk powder, causing one of China's largest food safety cases to date. It was also caused by the 2007 pet food contamination incident in the United States.


    Sunday, March 15, 2020 12:10 PM
  • Hello,

    Today's work is Phenylhydrazine(C6H5NHNH2) (QCW327).

    Seid Bereit!

    Best Wishes.


    Monday, March 16, 2020 1:27 PM
  • Hi,

    I made a Saccharin(C7H5NO3S) model. The ID is CLF179-0.

    Seid Bereit!

    Best Wishes.

    Wednesday, March 18, 2020 12:05 PM
  • Good Job! This inspires me to do a lot of programs!

    A student who wants to help! - Roshan

    Wednesday, March 18, 2020 12:15 PM
  • Thank you so much, Roshan!

    And today's work is Propanone(CH3COCH3)

    Although this work is relatively simple, it is super logical.

    The ID is SHQ115.

    Seid Bereit!

    Best Wishes.


    Thursday, March 19, 2020 3:27 PM
  • Hi,

    Everyone knows today's chemical: Aspirin(C9H8O4)!

    The ID is GKV904.

    p.s. Like most organic chemicals, it has a very long name (called the IUPAC name): 2-ethanoylhydroxybenzoic acid.

    Seid Bereit!

    Best Wishes.


    Friday, March 20, 2020 12:55 PM
  • Hi,

    Because of the new coronavirus epidemic, today's work is about a disinfectant, ammonia water(NH4OH).

    The ID is VZT837.

    There is a problem in today's program: the For loop seems to be broken, so the simplicity and legibility of the program are not very good.

    Seid Bereit!

    Best Wishes!

    Saturday, March 21, 2020 12:46 PM
  • Hello,

    Today's chemicals is very high-end and remote: Oxolane(C9H8O). It can dissolve PVC!

    The ID is QRC904.

    Seid Bereit!

    Best Wishes.



    Sunday, March 22, 2020 11:43 AM
  • Hello,

    Today's work: Terephthalic acid[C6H4(COOH)2].

    ID: PXH663.

    Seid Bereit!

    Best Regards.

    Thursday, March 26, 2020 10:57 AM
  • i made a index of all chemicals here:

    1,2-benzenedicarboxylic anhydride C6H4(CO)2O	NSS250
    ammonia water (NH4OH)	VZT837
    Aspirin (C9H8O4)	?
    Cyclopropene C3H4	TMK113
    diaminomethanal(urea) (NH2)2CO	GRD203
    Formaldehyde HCHO	RQG434
    Glycine C2H5NO2	VLG376
    Melamine	QCH183
    Methyl formate  HC(O)OCH3	DPH920
    Naphthalene C10H8 	PPV067
    Oxolane C9H8O	?
    Phenylhydrazine C6H5NHNH2	QCW327
    Propanone (CH3COCH3)	SHQ115
    Saccharin C7H5NO3S	CLF179-0
    Terephthalic acid C6H4(COOH)2	PXH663
    

    • Edited by Tryhest Sunday, March 29, 2020 7:40 AM
    Sunday, March 29, 2020 7:36 AM
  • Hello Tryhest,

    Thank you! Without this index from you, I can't find out that I forgot to add two IDs...

    It's very convenient. Thank you so much!

    Best Regards & Wishes!



    Sunday, March 29, 2020 10:45 AM
  • and updated index now:

    Sunday, March 29, 2020 9:36 PM
    • some chemicals from The Mollecular challenge: JQX626

    • zoom with mousewheel
    • auto slide advance 4sec

    • Edited by Tryhest Tuesday, March 31, 2020 5:01 PM
    Tuesday, March 31, 2020 4:59 PM
  • Hi Tryhest,

    Thanks! Your programs were never bad!

    Today's work: 1,4-dioxin.

    I will post it later.

    Best Regards & Thank you very much!


    Wednesday, April 1, 2020 1:47 AM
  • update: NQJ798-1

    • added menu with 6 formulas

    Wednesday, April 1, 2020 4:27 PM
  • updated to 9 chems: CRN180

    Wednesday, April 1, 2020 8:54 PM
  • added viewall-mode: CRN180-1

    • cursorkey panning
    • popup desc. of compounds added

    • Edited by Tryhest Thursday, April 2, 2020 5:32 AM
    Thursday, April 2, 2020 5:06 AM
  • Hi,

    I come too late... Here's 1,4-dioxin, a poison.(JPB942)

    Seid Bereit!

    Best Wishes & Thanks Tryhest for his 1325-lines-program!


    Thursday, April 2, 2020 8:19 AM
  • now all 15 molecules at once: LGP380-1


    • Edited by Tryhest Thursday, April 2, 2020 8:03 PM
    Thursday, April 2, 2020 8:02 PM
  • added wiki image of molecule: TSD093

    to display wiki image:

    • rightclick the atom when is tooltip displayed
    • image is opened by embedded browser
    • to zoom in/out use mswheel

    Friday, April 3, 2020 9:33 AM
  • Hello,

    I'm going to make the best work I made in this thread, I call it "Molecular Basic".

    Saturday, April 4, 2020 2:39 PM
  • Hello,

    I hope these programs can be implemented more easily, so I brought "Molecular Basic"!

    It is more automatic!

    BDW444

    Best Regards & Thanks!

    Sunday, April 5, 2020 12:20 PM
  • Hello,

    Today's work: Stearic acid[(CH3(CH2)16COOH]!

    The sodium salt of Stearic acid is one of the main ingredients of soap.

    The ID is QVT025

    Seid Bereit!

    Best Regards.


    Wednesday, April 22, 2020 1:41 AM
  • Hi Thaelmann-Pioniere, I like this one (stearic acid).  Thanks.

    Nonki Takahashi

    Wednesday, April 22, 2020 1:59 AM
    Moderator
  • Hi,

    Today's work is inseparable from diabetes: Metformin(QGB404).

    Seid Bereit!

    Best Regards.

    Sunday, May 3, 2020 3:27 PM
  • Back again!

    New version of Molecular Basic: RFQ344-0.

    A simple program for drawing planar atomic sturcture.


    Seid Bereit!

    Best Regards.

    Wednesday, July 15, 2020 2:56 AM
  • Caffeine, used Molecular Basic 2:

    Thursday, July 16, 2020 1:13 AM
  • Caffeine, used Molecular Basic 2:

     id?
    Wednesday, August 12, 2020 4:00 AM
  • Tryhest,

    No ID even no program because I made Molecular Basic 2 and Caffeine is a example to reveal it works; also, because Molecular Basic is definetely "Basic", so I only can describe it as a "semi-automated" machine. I just needn't write a program for every work, but enter some number.

    I'd like to add some new functions to it. The first one is maybe "outputting a program in a TXT file".

    Best Regards!

    Wednesday, August 12, 2020 1:18 PM
  • so u created a pseudo-batch language.

    u have to create a log file then. and a parser to process it as well))


    • Edited by Tryhest Thursday, August 20, 2020 12:40 PM
    Thursday, August 20, 2020 12:38 PM
  • Hi Tryhest,

    ??? I made what? A pseudo-batch language?

    Oh, I've searched just now, and it seem that you're correct. But how to create a log file and a parser?

    Best Regards & Thank you!

    p.s. Maybe I cannot improve my "Molecular Basic 2" in some days. Maybe...

    Friday, August 21, 2020 2:51 PM
  • log file is quite a simple task

    just append txtbox contents to a file when u click drawbutton:

    tx1=Controls.GetTextBoxText(textbox1)

    tx2=Controls.GetTextBoxText(textbox2)

    tx3=Controls.GetTextBoxText(textbox3)

    File.AppendContents("e:\ff.log" tx1+";"+tx2+";"+tx3+"|")


    • Edited by Tryhest Saturday, August 22, 2020 5:53 AM
    Saturday, August 22, 2020 5:53 AM