You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 KiB

a longan tree

龙眼树

what is longan?

Dimocarpus longan, commonly known as the longan, is a tropical tree species that produces edible fruit. It is one of the better-known tropical members of the soapberry family Sapindaceae,to which the lychee and rambutan also belong. The fruit of the longan is similar to that of the lychee, but less aromatic in taste.

a photo of a longan tree with fruits

from reddit post https://www.reddit.com/r/gardening/comments/8cfh6n/our_glorious_longan_tree/

In [12]:
from IPython.display import Image
url_tree = "images/longan_tree.jpg"
Image(url= url_tree, width=400, height=400)
Out[12]:

what is the soapberry family Sapindaceae?

The Sapindaceae are a family of flowering plants in the order Sapindales known as the soapberry family.

why is knowing the soapberry family important for the longan tree

As we know the longan tree is one tree species under the soapberry family, we can track the other tree species relevant to the longan tree. The lychee tree, the rambutan tree, and the longan tree are closely related to each other.

This is written in early spring, and longan fruits are harvested during the summer. In villages in Southern China, harvesting longan fruits "摘龙眼"is a fun summer activity.

Longan also means "dragon eye". The fruit is round, resembling an eyeball of a dragon. There is also the "phoenix eye"(凤眼),referring to eyes that has a long-ish shape and tilts upwards.

In a gender binary context, suppose there is a pair of twins that's a boy and a girl. In Chinese such pair of twins is refered to as "dragon and phoenix twin"(龙凤胎)。Suppose the girl has the "phonenix eyes"(凤眼), then would the boy eat loads of "dragon eyes"(龙眼)?! 在性别二元对立的语境下,有一对龙凤胎,女孩有一双凤眼,那男孩岂不是有一双龙眼?!

In [23]:
eyes_l = ["⊙","ಠ","ಡ","⚆",
          "✪","◙","*","°",
          "☉","⚈","๏","◔",
          "◉","ʘ","Θ","❍",
          "●","ᓂ","ᓀ","•͈",
         ]

dragon eyes of various affects

呆萌的龙眼,迟疑的龙眼,左顾右盼的龙眼,闪烁其辞的龙眼。 被踩扁的龙眼,爆了浆的龙眼,剥开皮的龙眼,被掏空的龙眼。

In [24]:
# build a tree from eyes_l
# can try a binary tree structure
# however, a longan tree cannot be arbitrarily defined as using
# the bst structure
# are there other tree branching structures to try? 
In [25]:
# starting from a yard of trees: longan, lychee and rombutan 
In [26]:
from anytree import Node, RenderTree
# build tree
soapberryForest = Node("soapberry forest")
longan = Node("longan", parent=soapberryForest)
lychee = Node("lychee", parent=soapberryForest)
rombutan = Node("rombutan", parent=soapberryForest)

# print tree
for pre, fill, node in RenderTree(soapberryForest):
	print("%s%s" %(pre,node.name))
soapberry forest
├── longan
├── lychee
└── rombutan
In [27]:
# bst tree template 
"""Python3 program to demonstrate insert
operation in binary search tree """

# A Binary Tree Node
# Utility function to create a
# new tree node
class newNode:

    # Constructor to create a newNode
    def __init__(self, data):
        self.key= data
        self.left = None
        self.right = self.parent = None

# A utility function to insert a new
# Node with given key in BST
def insert(root, key):

    # Create a new Node containing
    # the new element
    newnode = newNode(key)

    # Pointer to start traversing from root
    # and traverses downward path to search
    # where the new node to be inserted
    x = root

    # Pointer y maintains the trailing
    # pointer of x
    y = None

    while (x != None):
        y = x
        if (key < x.key):
            x = x.left
        else:
            x = x.right
    
    # If the root is None i.e the tree is
    # empty. The new node is the root node
    if (y == None):
        y = newnode

    # If the new key is less then the leaf node key
    # Assign the new node to be its left child
    elif (key < y.key):
        y.left = newnode

    # else assign the new node its
    # right child
    else:
        y.right = newnode

    # Returns the pointer where the
    # new node is inserted
    return y

#Driver Code
if __name__ == '__main__':

    root = None
    root = insert(root, "longan tree")
    for eye in eyes_l:
        insert(root,eye)
In [28]:
COUNT = [10]
def print2DUtil(root, space) :

    # Base case
    if (root == None) :
        return

    # Increase distance between levels
    space += COUNT[0]

    # Process right child first
    print2DUtil(root.right, space)

    # Print current node after space
    # count
    print()
    for i in range(COUNT[0], space):
        print(end = " ")
    print(root.key)

    # Process left child
    print2DUtil(root.left, space)

# Wrapper over print2DUtil()
def print2D(root) :
    
    # space=[0]
    # Pass initial space count as 0
    print2DUtil(root, 0)

# Driver Code
if __name__ == '__main__':

    
    print2D(root)
                                        ❍

                              ✪

                                        ⚈

                    ⚆

                                        ☉

                              ◙

                                        ◔

                                                            ●

                                                  ◉

          ⊙

                                                            •͈

                                                  ᓂ

                                                            ᓀ

                                        ๏

                              ಡ

                    ಠ

                                                  Θ

                                        ʘ

                              °

longan tree

          *

a pun, a poem, a puoem.